Style with jscs.

This commit is contained in:
Alexis Lahouze 2016-10-09 20:33:59 +02:00
parent 9f0258905d
commit d7ead2aa5c
13 changed files with 120 additions and 120 deletions

View File

@ -26,9 +26,9 @@ module.exports = function(grunt) {
grunt.initConfig(configs);
grunt.registerTask('dependencies', [
'shell:npm_install',
'shell:bower_install',
'shell:pip_install',
'shell:npmInstall',
'shell:bowerInstall',
'shell:pipInstall',
'wiredep:app'
]);

View File

@ -2,39 +2,39 @@
module.exports = {
options: {
port: 5001,
hostname: 'localhost',
base: '<%= accountant.frontend.src %>',
apiUrl: 'http://localhost:5000/api/',
swaggerUiUrl: 'http://localhost:5000/swaggerui/',
livereload: 1337,
port: 5001,
hostname: 'localhost',
base: '<%= accountant.frontend.src %>',
apiUrl: 'http://localhost:5000/api/',
swaggerUiUrl: 'http://localhost:5000/swaggerui/',
livereload: 1337
},
proxies: [{
context: '/api',
host: '127.0.0.1',
port: 5000,
https: false
context: '/api',
host: '127.0.0.1',
port: 5000,
https: false
}, {
contect: '/swaggerui',
host: '127.0.0.1',
port: 5000,
https: false
contect: '/swaggerui',
host: '127.0.0.1',
port: 5000,
https: false
}],
livereload: {
options: {
//open: true,
middleware: function(connect, options, middlewares) {
var connectLogger = require('connect-logger');
var connectProxy = require('connect-proxy-layer');
var apiProxy = connectProxy(options.apiUrl);
var swaggerUiProxy = connectProxy(options.swaggerUiUrl);
options: {
//open: true,
middleware: function(connect, options, middlewares) {
var connectLogger = require('connect-logger');
var connectProxy = require('connect-proxy-layer');
var apiProxy = connectProxy(options.apiUrl);
var swaggerUiProxy = connectProxy(options.swaggerUiUrl);
return [
connectLogger(),
connect().use('/api', apiProxy),
connect().use('/swaggerUi', swaggerUiProxy),
].concat(middlewares);
return [
connectLogger(),
connect().use('/api', apiProxy),
connect().use('/swaggerUi', swaggerUiProxy)
].concat(middlewares);
}
}
}
}
};

View File

@ -2,21 +2,21 @@
module.exports = {
dist: {
files: [{
expand: true,
dot: true,
cwd: '<%= accountant.frontend.src %>',
dest: '<%= accountant.frontend.dist %>',
src :[
'*.html',
'views/*.html',
]
}]
files: [{
expand: true,
dot: true,
cwd: '<%= accountant.frontend.src %>',
dest: '<%= accountant.frontend.dist %>',
src: [
'*.html',
'views/*.html'
]
}]
},
styles: {
expand: true,
cwd: '<%= accountant.frontend.src %>/css',
dest: '.tmp/css',
src: '{,*/}*.css'
expand: true,
cwd: '<%= accountant.frontend.src %>/css',
dest: '.tmp/css',
src: '{,*/}*.css'
}
};

View File

@ -1,17 +1,17 @@
'use strict';
module.exports = {
options: {
encoding: 'utf-8',
algorithm: 'md5',
length: 8
},
dist: {
src: [
'<%= accountant.frontend.dist %>/css/*.css',
'<%= accountant.frontend.dist %>/js/*.js',
'!<%= accountant.frontend.dist %>/css/*.map.css',
'!<%= accountant.frontend.dist %>/js/*.map.js'
]
},
options: {
encoding: 'utf-8',
algorithm: 'md5',
length: 8
},
dist: {
src: [
'<%= accountant.frontend.dist %>/css/*.css',
'<%= accountant.frontend.dist %>/js/*.js',
'!<%= accountant.frontend.dist %>/css/*.map.css',
'!<%= accountant.frontend.dist %>/js/*.map.js'
]
}
};

View File

@ -1,16 +1,16 @@
module.exports = {
frontend: {
options: {
'attr-name-style': 'dash',
'attr-req-value': false,
'id-class-ignore-regex': '{{.*?}}',
'id-class-style': 'dash',
'indent-style': 'spaces',
'indent-width': 2
},
src: [
'<%= accountant.frontend.src %>/*.html',
'<%= accountant.frontend.src %>/views/*.html'
]
options: {
'attr-name-style': 'dash',
'attr-req-value': false,
'id-class-ignore-regex': '{{.*?}}',
'id-class-style': 'dash',
'indent-style': 'spaces',
'indent-width': 2
},
src: [
'<%= accountant.frontend.src %>/*.html',
'<%= accountant.frontend.src %>/views/*.html'
]
}
};

View File

@ -1,13 +1,13 @@
'use strict';
module.exports = {
options: {
basePath: '<%= accountant.frontend.src %>',
baseUrl: ''
},
index: {
files: {
'<%= accountant.frontend.src %>/index.html': '<%= accountant.frontend.src %>/index.html'
options: {
basePath: '<%= accountant.frontend.src %>',
baseUrl: ''
},
index: {
files: {
'<%= accountant.frontend.src %>/index.html': '<%= accountant.frontend.src %>/index.html'
}
}
}
};

View File

@ -2,7 +2,7 @@ module.exports = {
options: {
config: '.jscsrc'
},
frontend_js: [
frontendJs: [
'<%= accountant.frontend.src %>/js/*.js'
],
toolchain: [

View File

@ -3,7 +3,7 @@ module.exports = {
jshintrc: '.jshintrc',
reporter: require('jshint-stylish')
},
frontend_js: [
frontendJs: [
'<%= accountant.frontend.src %>/js/*.js'
],
toolchain: [

View File

@ -2,11 +2,11 @@
module.exports = {
dist: {
files: [{
expand: true,
cwd: '.tmp/concat/js',
src: '*.js',
dest: '.tmp/concat/js'
}]
files: [{
expand: true,
cwd: '.tmp/concat/js',
src: '*.js',
dest: '.tmp/concat/js'
}]
}
};

View File

@ -1,11 +1,11 @@
module.exports = {
npm_install: {
npmInstall: {
command: 'npm install'
},
bower_install: {
bowerInstall: {
command: 'bower install'
},
pip_install: {
pipInstall: {
command: 'pip install --upgrade --requirement requirements.txt'
}
};

View File

@ -1,16 +1,16 @@
'use strict';
module.exports = {
html: ['<%= accountant.frontend.dist %>/{,*/}*.html'],
css: ['<%= accountant.frontend.dist %>/css/{,*/}*.css'],
js: ['<%= accountant.frontend.dist %>/js/{,*/}*.js'],
options: {
assetsDir: [
'<%= accountant.frontend.dist %>',
'<%= accountant.frontend.dist %>/css',
],
patterns: {
js: [[/(images\/[^''""]*\.(png|jpg|jpeg|gif|webp|svg))/g, 'Replacing references to images']]
html: ['<%= accountant.frontend.dist %>/{,*/}*.html'],
css: ['<%= accountant.frontend.dist %>/css/{,*/}*.css'],
js: ['<%= accountant.frontend.dist %>/js/{,*/}*.js'],
options: {
assetsDir: [
'<%= accountant.frontend.dist %>',
'<%= accountant.frontend.dist %>/css'
],
patterns: {
js: [[/(images\/[^''""]*\.(png|jpg|jpeg|gif|webp|svg))/g, 'Replacing references to images']]
}
}
}
};

View File

@ -1,17 +1,17 @@
'use strict';
module.exports = {
html: '<%= accountant.frontend.src %>/index.html ',
options: {
dest: '<%= accountant.frontend.dist %>',
flow: {
html: {
steps: {
js: ['concat', 'uglify'],
css: ['cssmin']
},
post: {}
}
html: '<%= accountant.frontend.src %>/index.html ',
options: {
dest: '<%= accountant.frontend.dist %>',
flow: {
html: {
steps: {
js: ['concat', 'uglify'],
css: ['cssmin']
},
post: {}
}
}
}
}
};

View File

@ -27,17 +27,17 @@ module.exports = {
files: ['Gruntfile.js', 'grunt-config/*.js']
},
livereload: {
options: {
livereload: '<%= connect.options.livereload %>'
},
files: [
'<%= accountant.frontend.src %>/{,*/}*.html',
'<%= accountant.frontend.src %>/js/*.js',
'<%= accountant.frontend.src %>/css/*.css'
]
options: {
livereload: '<%= connect.options.livereload %>'
},
files: [
'<%= accountant.frontend.src %>/{,*/}*.html',
'<%= accountant.frontend.src %>/js/*.js',
'<%= accountant.frontend.src %>/css/*.css'
]
},
requirements: {
files: ['requirements.txt'],
tasks: ['shell:pip_install']
tasks: ['shell:pipInstall']
}
};