Improve Grunt integration. Wiredep.
This commit is contained in:
parent
a68f834006
commit
aa4e2d9d6f
3
.bowerrc
Normal file
3
.bowerrc
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"directory": "accountant/frontend/static/bower_components"
|
||||
}
|
18
Gruntfile.js
18
Gruntfile.js
@ -2,8 +2,15 @@ module.exports = function(grunt) {
|
||||
require('load-grunt-tasks')(grunt);
|
||||
require('time-grunt')(grunt);
|
||||
|
||||
var appConfig = {
|
||||
app: require('./bower.json'),
|
||||
dist: 'dist'
|
||||
};
|
||||
|
||||
// Options
|
||||
var options = {
|
||||
accountant: appConfig,
|
||||
|
||||
config: {
|
||||
src: "grunt-config/*.js"
|
||||
},
|
||||
@ -26,14 +33,23 @@ module.exports = function(grunt) {
|
||||
|
||||
grunt.registerTask('generatestatic', [
|
||||
'shell:npm_install',
|
||||
'shell:bower_install',
|
||||
'wiredep:app',
|
||||
]);
|
||||
|
||||
grunt.registerTask('jsdev', [
|
||||
'jshint',
|
||||
'newer:jshint',
|
||||
'newer:jscs'
|
||||
]);
|
||||
|
||||
grunt.registerTask('dev', [
|
||||
'generatestatic',
|
||||
'jsdev'
|
||||
]);
|
||||
|
||||
grunt.registerTask('serve', [
|
||||
'dev',
|
||||
'bgShell:runserver',
|
||||
'watch'
|
||||
]);
|
||||
};
|
||||
|
22
bower.json
22
bower.json
@ -5,6 +5,10 @@
|
||||
"Alexis Lahouze <xals@lahouze.org>"
|
||||
],
|
||||
"license": "AGPL",
|
||||
"main": [
|
||||
"accountant/frontend/templates/layout.html",
|
||||
"accountant/frontend/static/js/app.js"
|
||||
],
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
@ -28,6 +32,22 @@
|
||||
"angular-http-auth": "~1.2.3",
|
||||
"meanie-angular-storage": "~1.1",
|
||||
"font-awesome": ">=4.5.0",
|
||||
"bootbox": "~4.4.0"
|
||||
"bootbox": "~4.4.0",
|
||||
"angular-bootstrap": "^1.1.1"
|
||||
},
|
||||
"overrides": {
|
||||
"bootstrap": {
|
||||
"main": [
|
||||
"less/bootstrap.less",
|
||||
"dist/css/bootstrap.css",
|
||||
"dist/js/bootstrap.js"
|
||||
]
|
||||
},
|
||||
"font-awesome": {
|
||||
"main": [
|
||||
"./css/font-awesome.css",
|
||||
"./fonts/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
6
grunt-config/bgShell.js
Normal file
6
grunt-config/bgShell.js
Normal file
@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
runserver: {
|
||||
cmd: 'python -m manage runserver',
|
||||
bg: true
|
||||
}
|
||||
};
|
12
grunt-config/jscs.js
Normal file
12
grunt-config/jscs.js
Normal file
@ -0,0 +1,12 @@
|
||||
module.exports = {
|
||||
options: {
|
||||
config: '.jscsrc',
|
||||
verbose: true
|
||||
},
|
||||
frontend_js: [
|
||||
'<%= paths.frontend_js %>'
|
||||
],
|
||||
toolchain: [
|
||||
'Gruntfile.js'
|
||||
]
|
||||
};
|
@ -1,5 +1,8 @@
|
||||
module.exports = {
|
||||
npm_install: {
|
||||
command: 'npm install'
|
||||
},
|
||||
bower_install: {
|
||||
command: 'bower install'
|
||||
}
|
||||
};
|
||||
|
@ -1,6 +1,13 @@
|
||||
module.exports = {
|
||||
bower: {
|
||||
files: 'bower.json',
|
||||
tasks: ['wiredep']
|
||||
},
|
||||
js: {
|
||||
files: '<%= paths.frontend_js %>',
|
||||
tasks: ['jshint:frontend_js', 'concat:frontend_js']
|
||||
tasks: ['devjs']
|
||||
},
|
||||
gruntfile: {
|
||||
files: ['Gruntfile.js']
|
||||
}
|
||||
};
|
||||
|
6
grunt-config/wiredep.js
Normal file
6
grunt-config/wiredep.js
Normal file
@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
app: {
|
||||
src: ['accountant/frontend/templates/layout.html'],
|
||||
ignorePath: /\.\.\//
|
||||
}
|
||||
};
|
21
package.json
21
package.json
@ -3,18 +3,21 @@
|
||||
"version": "0.1.0",
|
||||
"repository": "https://git.lahouze.org/xals/accountant",
|
||||
"license": "AGPL-1.0",
|
||||
"dependencies": {
|
||||
"devDependencies": {
|
||||
"grunt": "0.4.5",
|
||||
"grunt-copy": "0.1.0",
|
||||
"grunt-bg-shell": "^2.3.1",
|
||||
"grunt-contrib-clean": "0.6.0",
|
||||
"grunt-contrib-watch": "0.6.1",
|
||||
"grunt-contrib-concat": "0.5.1",
|
||||
"time-grunt": "1.2.1",
|
||||
"grunt-contrib-jshint": "0.11.2",
|
||||
"grunt-contrib-watch": "0.6.1",
|
||||
"grunt-copy": "0.1.0",
|
||||
"grunt-jscs": "^2.6.0",
|
||||
"grunt-newer": "^1.1.1",
|
||||
"grunt-shell": "1.1.2",
|
||||
"grunt-wiredep": "^2.0.0",
|
||||
"jshint-stylish": "2.0.0",
|
||||
"load-grunt-configs": "0.4.3",
|
||||
"load-grunt-tasks": "3.2.0",
|
||||
"grunt-shell": "1.1.2",
|
||||
"grunt-contrib-jshint": "0.11.2",
|
||||
"jshint-stylish": "2.0.0"
|
||||
},
|
||||
"devDependencies": {}
|
||||
"time-grunt": "1.2.1"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user