Style with jscs.
This commit is contained in:
parent
9f0258905d
commit
d7ead2aa5c
@ -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'
|
||||
]);
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -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'
|
||||
}
|
||||
};
|
||||
|
@ -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'
|
||||
]
|
||||
}
|
||||
};
|
||||
|
@ -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'
|
||||
]
|
||||
}
|
||||
};
|
||||
|
@ -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'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -2,7 +2,7 @@ module.exports = {
|
||||
options: {
|
||||
config: '.jscsrc'
|
||||
},
|
||||
frontend_js: [
|
||||
frontendJs: [
|
||||
'<%= accountant.frontend.src %>/js/*.js'
|
||||
],
|
||||
toolchain: [
|
||||
|
@ -3,7 +3,7 @@ module.exports = {
|
||||
jshintrc: '.jshintrc',
|
||||
reporter: require('jshint-stylish')
|
||||
},
|
||||
frontend_js: [
|
||||
frontendJs: [
|
||||
'<%= accountant.frontend.src %>/js/*.js'
|
||||
],
|
||||
toolchain: [
|
||||
|
@ -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'
|
||||
}]
|
||||
}
|
||||
};
|
||||
|
@ -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'
|
||||
}
|
||||
};
|
||||
|
@ -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']]
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -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: {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -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']
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user