Skip to content

Commit

Permalink
[#2772]Expunge tabs.
Browse files Browse the repository at this point in the history
  • Loading branch information
stellanl committed Apr 8, 2019
2 parents 919047b + 74e1e9e commit 3a3785c
Show file tree
Hide file tree
Showing 175 changed files with 15,137 additions and 2,593 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,6 @@ out/
.idea/
*.iml
rake.log
lein.log
lein.log

tmp/
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ script:

before_cache:
- find $HOME/.m2 -name resolver-status.properties -exec rm {} \;

notifications:
slack: akvo:ZLetmotGiT22QryK6pR5bnFS
42 changes: 42 additions & 0 deletions Dashboard/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"plugins": [
"transform-class-properties",
"transform-es2015-for-of"
],
"env": {
"development": {
"presets": [
"env",
"react",
"react-hmre",
"stage-2"
]
},
"production": {
"presets": [
[
"env",
{
"targets": {
"ie": 9,
"uglify": true
}
}
],
"react",
"stage-2"
],
"plugins": [
"transform-react-constant-elements",
"transform-react-remove-prop-types"
]
},
"test": {
"presets": [
"env",
"react",
"stage-2"
]
}
}
}
83 changes: 83 additions & 0 deletions Dashboard/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"extends": "airbnb",
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true
},
"plugins": [
"react",
"babel"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
"camelcase": 1,
"class-methods-use-this": 1,
"comma-dangle": ["error", {
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "never",
"functions": "never"
}],
"func-names": 0,
"global-require": 1,
"jsx-a11y/no-static-element-interactions": 0,
"no-plusplus": 0,
"no-underscore-dangle": 0,
"prefer-const": 1,
"prefer-destructuring": 1,
"radix": 1,
"react/forbid-prop-types": 0,
"react/no-unused-prop-types": 0,
"react/no-multi-comp": 0,

"no-mixed-operators": 1,
"no-bitwise": 0,
"prefer-spread": 1,
"prefer-rest-params": 1,
"no-throw-literal": 1,
"import/no-extraneous-dependencies": 1,
"no-unused-vars": 1,
"eqeqeq": 1,
"max-len": 1,
"no-continue": 1,
"no-mixed-spaces-and-tabs": 1,
"no-tabs": 1,
"no-extend-native": 1,
"no-use-before-define": 1,
"no-param-reassign": 1,
"consistent-return": 1,
"no-restricted-globals": 1,
"import/no-unresolved": 1,
"function-paren-newline": 1,
"no-var": 1,
"no-lonely-if": 1,
"no-useless-escape": 1,
"no-useless-concat": 1,
"no-irregular-whitespace": 1,
"vars-on-top": 1,
"new-cap": 1,
"no-array-constructor": 1,
"no-restricted-syntax": 1,
"guard-for-in": 1,
"no-empty": 1,
"for-direction": 1,
"no-shadow": 1,
"no-unused-expressions": 1,
"no-loop-func": 1
},
"globals": {
"window": true,
"document": true,
"FLOW": true,
"Ember": true,
"$": true,
"jQuery": true,
"DS": true
}
}
109 changes: 0 additions & 109 deletions Dashboard/Assetfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,115 +17,6 @@ class LoaderFilter < WebFilters::MinispadeFilter
end
end

class EmberAssertFilter < Filter
def generate_output(inputs, output)
inputs.each do |input|
result = input.read
result.gsub!(/ember_assert\((.*)\);/, '')
output.write(result)
end
end
end

class HandlebarsFilter < Filter
def generate_output(inputs, output)
inputs.each do |input|
code = input.read.to_json
name = File.basename(input.path, '.handlebars')
output.write "\nreturn Ember.Handlebars.compile(#{code});\n"
end
end
end

class CSSMinFilter < Filter
def generate_output(inputs, output)
inputs.each do |input|
result = input.read
result.gsub!(/href="css\/(.*)\.css"/, 'href="css/\1.min.css"') # index.html
result.gsub!(/url\("(.*?).css"\)/, 'url("\1.min.css")') # screen.css
output.write(result)
end
end
end

output '../GAE/target/akvo-flow/admin'
input 'app' do

match 'css/main.scss' do
scss
end

match 'css/users.scss' do
scss
end

match 'dashboard.html' do
if ENV['RAKEP_MODE'] == 'production'
filter CSSMinFilter
end
copy 'index.html'
end

match 'js/lib/**/*.js' do
filter LoaderFilter,
:module_id_generator => proc { |input|
input.path.sub(/^js\/lib\//, "#{APPNAME}/").sub(/\.js$/, '')
}

if ENV['RAKEP_MODE'] == 'production'
filter EmberAssertFilter
uglify {|input| input}
end
concat 'js/app.js'
end

match 'js/plugins/**/*.js' do
if ENV['RAKEP_MODE'] == 'production'
uglify {|input| input}
end
concat do |input|
input.sub(/plugins\//, '')
end
end

match 'js/templates/**/*.handlebars' do
filter HandlebarsFilter
filter LoaderFilter,
:module_id_generator => proc { |input|
input.path.sub(/^js\/templates\//, "#{APPNAME}/templates/").sub(/\.handlebars$/, '')
}
if ENV['RAKEP_MODE'] == 'production'
uglify {|input| input}
end
concat 'js/app.js'
end


match "static/**/*" do
concat do |input|
input.sub(/static\//, '')
end
end

match "css/custom-theme/images/*" do
concat do |input|
input.sub(/static\//, '')
end
end

match "css/**/*.css" do
if ENV['RAKEP_MODE'] == 'production'
yui_css
filter CSSMinFilter
else
concat do |input|
input
end
end
end

end

output '../GAE/target/akvo-flow/vendorjs'
input 'app' do
match "js/vendor/**/*.js" do
Expand Down
Loading

0 comments on commit 3a3785c

Please sign in to comment.