Style with jscs.
This commit is contained in:
parent
9f0258905d
commit
d7ead2aa5c
@ -26,9 +26,9 @@ module.exports = function(grunt) {
|
|||||||
grunt.initConfig(configs);
|
grunt.initConfig(configs);
|
||||||
|
|
||||||
grunt.registerTask('dependencies', [
|
grunt.registerTask('dependencies', [
|
||||||
'shell:npm_install',
|
'shell:npmInstall',
|
||||||
'shell:bower_install',
|
'shell:bowerInstall',
|
||||||
'shell:pip_install',
|
'shell:pipInstall',
|
||||||
'wiredep:app'
|
'wiredep:app'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -2,39 +2,39 @@
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
options: {
|
options: {
|
||||||
port: 5001,
|
port: 5001,
|
||||||
hostname: 'localhost',
|
hostname: 'localhost',
|
||||||
base: '<%= accountant.frontend.src %>',
|
base: '<%= accountant.frontend.src %>',
|
||||||
apiUrl: 'http://localhost:5000/api/',
|
apiUrl: 'http://localhost:5000/api/',
|
||||||
swaggerUiUrl: 'http://localhost:5000/swaggerui/',
|
swaggerUiUrl: 'http://localhost:5000/swaggerui/',
|
||||||
livereload: 1337,
|
livereload: 1337
|
||||||
},
|
},
|
||||||
proxies: [{
|
proxies: [{
|
||||||
context: '/api',
|
context: '/api',
|
||||||
host: '127.0.0.1',
|
host: '127.0.0.1',
|
||||||
port: 5000,
|
port: 5000,
|
||||||
https: false
|
https: false
|
||||||
}, {
|
}, {
|
||||||
contect: '/swaggerui',
|
contect: '/swaggerui',
|
||||||
host: '127.0.0.1',
|
host: '127.0.0.1',
|
||||||
port: 5000,
|
port: 5000,
|
||||||
https: false
|
https: false
|
||||||
}],
|
}],
|
||||||
livereload: {
|
livereload: {
|
||||||
options: {
|
options: {
|
||||||
//open: true,
|
//open: true,
|
||||||
middleware: function(connect, options, middlewares) {
|
middleware: function(connect, options, middlewares) {
|
||||||
var connectLogger = require('connect-logger');
|
var connectLogger = require('connect-logger');
|
||||||
var connectProxy = require('connect-proxy-layer');
|
var connectProxy = require('connect-proxy-layer');
|
||||||
var apiProxy = connectProxy(options.apiUrl);
|
var apiProxy = connectProxy(options.apiUrl);
|
||||||
var swaggerUiProxy = connectProxy(options.swaggerUiUrl);
|
var swaggerUiProxy = connectProxy(options.swaggerUiUrl);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
connectLogger(),
|
connectLogger(),
|
||||||
connect().use('/api', apiProxy),
|
connect().use('/api', apiProxy),
|
||||||
connect().use('/swaggerUi', swaggerUiProxy),
|
connect().use('/swaggerUi', swaggerUiProxy)
|
||||||
].concat(middlewares);
|
].concat(middlewares);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -2,21 +2,21 @@
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
dist: {
|
dist: {
|
||||||
files: [{
|
files: [{
|
||||||
expand: true,
|
expand: true,
|
||||||
dot: true,
|
dot: true,
|
||||||
cwd: '<%= accountant.frontend.src %>',
|
cwd: '<%= accountant.frontend.src %>',
|
||||||
dest: '<%= accountant.frontend.dist %>',
|
dest: '<%= accountant.frontend.dist %>',
|
||||||
src :[
|
src: [
|
||||||
'*.html',
|
'*.html',
|
||||||
'views/*.html',
|
'views/*.html'
|
||||||
]
|
]
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
styles: {
|
styles: {
|
||||||
expand: true,
|
expand: true,
|
||||||
cwd: '<%= accountant.frontend.src %>/css',
|
cwd: '<%= accountant.frontend.src %>/css',
|
||||||
dest: '.tmp/css',
|
dest: '.tmp/css',
|
||||||
src: '{,*/}*.css'
|
src: '{,*/}*.css'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
options: {
|
options: {
|
||||||
encoding: 'utf-8',
|
encoding: 'utf-8',
|
||||||
algorithm: 'md5',
|
algorithm: 'md5',
|
||||||
length: 8
|
length: 8
|
||||||
},
|
},
|
||||||
dist: {
|
dist: {
|
||||||
src: [
|
src: [
|
||||||
'<%= accountant.frontend.dist %>/css/*.css',
|
'<%= accountant.frontend.dist %>/css/*.css',
|
||||||
'<%= accountant.frontend.dist %>/js/*.js',
|
'<%= accountant.frontend.dist %>/js/*.js',
|
||||||
'!<%= accountant.frontend.dist %>/css/*.map.css',
|
'!<%= accountant.frontend.dist %>/css/*.map.css',
|
||||||
'!<%= accountant.frontend.dist %>/js/*.map.js'
|
'!<%= accountant.frontend.dist %>/js/*.map.js'
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
frontend: {
|
frontend: {
|
||||||
options: {
|
options: {
|
||||||
'attr-name-style': 'dash',
|
'attr-name-style': 'dash',
|
||||||
'attr-req-value': false,
|
'attr-req-value': false,
|
||||||
'id-class-ignore-regex': '{{.*?}}',
|
'id-class-ignore-regex': '{{.*?}}',
|
||||||
'id-class-style': 'dash',
|
'id-class-style': 'dash',
|
||||||
'indent-style': 'spaces',
|
'indent-style': 'spaces',
|
||||||
'indent-width': 2
|
'indent-width': 2
|
||||||
},
|
},
|
||||||
src: [
|
src: [
|
||||||
'<%= accountant.frontend.src %>/*.html',
|
'<%= accountant.frontend.src %>/*.html',
|
||||||
'<%= accountant.frontend.src %>/views/*.html'
|
'<%= accountant.frontend.src %>/views/*.html'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
options: {
|
options: {
|
||||||
basePath: '<%= accountant.frontend.src %>',
|
basePath: '<%= accountant.frontend.src %>',
|
||||||
baseUrl: ''
|
baseUrl: ''
|
||||||
},
|
},
|
||||||
index: {
|
index: {
|
||||||
files: {
|
files: {
|
||||||
'<%= accountant.frontend.src %>/index.html': '<%= accountant.frontend.src %>/index.html'
|
'<%= accountant.frontend.src %>/index.html': '<%= accountant.frontend.src %>/index.html'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
@ -2,7 +2,7 @@ module.exports = {
|
|||||||
options: {
|
options: {
|
||||||
config: '.jscsrc'
|
config: '.jscsrc'
|
||||||
},
|
},
|
||||||
frontend_js: [
|
frontendJs: [
|
||||||
'<%= accountant.frontend.src %>/js/*.js'
|
'<%= accountant.frontend.src %>/js/*.js'
|
||||||
],
|
],
|
||||||
toolchain: [
|
toolchain: [
|
||||||
|
@ -3,7 +3,7 @@ module.exports = {
|
|||||||
jshintrc: '.jshintrc',
|
jshintrc: '.jshintrc',
|
||||||
reporter: require('jshint-stylish')
|
reporter: require('jshint-stylish')
|
||||||
},
|
},
|
||||||
frontend_js: [
|
frontendJs: [
|
||||||
'<%= accountant.frontend.src %>/js/*.js'
|
'<%= accountant.frontend.src %>/js/*.js'
|
||||||
],
|
],
|
||||||
toolchain: [
|
toolchain: [
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
dist: {
|
dist: {
|
||||||
files: [{
|
files: [{
|
||||||
expand: true,
|
expand: true,
|
||||||
cwd: '.tmp/concat/js',
|
cwd: '.tmp/concat/js',
|
||||||
src: '*.js',
|
src: '*.js',
|
||||||
dest: '.tmp/concat/js'
|
dest: '.tmp/concat/js'
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
npm_install: {
|
npmInstall: {
|
||||||
command: 'npm install'
|
command: 'npm install'
|
||||||
},
|
},
|
||||||
bower_install: {
|
bowerInstall: {
|
||||||
command: 'bower install'
|
command: 'bower install'
|
||||||
},
|
},
|
||||||
pip_install: {
|
pipInstall: {
|
||||||
command: 'pip install --upgrade --requirement requirements.txt'
|
command: 'pip install --upgrade --requirement requirements.txt'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
html: ['<%= accountant.frontend.dist %>/{,*/}*.html'],
|
html: ['<%= accountant.frontend.dist %>/{,*/}*.html'],
|
||||||
css: ['<%= accountant.frontend.dist %>/css/{,*/}*.css'],
|
css: ['<%= accountant.frontend.dist %>/css/{,*/}*.css'],
|
||||||
js: ['<%= accountant.frontend.dist %>/js/{,*/}*.js'],
|
js: ['<%= accountant.frontend.dist %>/js/{,*/}*.js'],
|
||||||
options: {
|
options: {
|
||||||
assetsDir: [
|
assetsDir: [
|
||||||
'<%= accountant.frontend.dist %>',
|
'<%= accountant.frontend.dist %>',
|
||||||
'<%= accountant.frontend.dist %>/css',
|
'<%= accountant.frontend.dist %>/css'
|
||||||
],
|
],
|
||||||
patterns: {
|
patterns: {
|
||||||
js: [[/(images\/[^''""]*\.(png|jpg|jpeg|gif|webp|svg))/g, 'Replacing references to images']]
|
js: [[/(images\/[^''""]*\.(png|jpg|jpeg|gif|webp|svg))/g, 'Replacing references to images']]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
html: '<%= accountant.frontend.src %>/index.html ',
|
html: '<%= accountant.frontend.src %>/index.html ',
|
||||||
options: {
|
options: {
|
||||||
dest: '<%= accountant.frontend.dist %>',
|
dest: '<%= accountant.frontend.dist %>',
|
||||||
flow: {
|
flow: {
|
||||||
html: {
|
html: {
|
||||||
steps: {
|
steps: {
|
||||||
js: ['concat', 'uglify'],
|
js: ['concat', 'uglify'],
|
||||||
css: ['cssmin']
|
css: ['cssmin']
|
||||||
},
|
},
|
||||||
post: {}
|
post: {}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
@ -27,17 +27,17 @@ module.exports = {
|
|||||||
files: ['Gruntfile.js', 'grunt-config/*.js']
|
files: ['Gruntfile.js', 'grunt-config/*.js']
|
||||||
},
|
},
|
||||||
livereload: {
|
livereload: {
|
||||||
options: {
|
options: {
|
||||||
livereload: '<%= connect.options.livereload %>'
|
livereload: '<%= connect.options.livereload %>'
|
||||||
},
|
},
|
||||||
files: [
|
files: [
|
||||||
'<%= accountant.frontend.src %>/{,*/}*.html',
|
'<%= accountant.frontend.src %>/{,*/}*.html',
|
||||||
'<%= accountant.frontend.src %>/js/*.js',
|
'<%= accountant.frontend.src %>/js/*.js',
|
||||||
'<%= accountant.frontend.src %>/css/*.css'
|
'<%= accountant.frontend.src %>/css/*.css'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
requirements: {
|
requirements: {
|
||||||
files: ['requirements.txt'],
|
files: ['requirements.txt'],
|
||||||
tasks: ['shell:pip_install']
|
tasks: ['shell:pipInstall']
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user