Manage project with Grunt and Bower.

This commit is contained in:
Alexis Lahouze
2015-06-13 17:37:35 +02:00
parent 27fa96a7cb
commit 8ef26895ad
11 changed files with 175 additions and 0 deletions

16
grunt-config/bower.js Normal file
View File

@ -0,0 +1,16 @@
module.exports = {
install: {
options: {
copy: false
}
},
frontend: {
dest: 'accountant/frontend/static/third-party',
options: {
expand: true,
stripAffix: true,
keepExpandedHierarchy: false
}
}
};

View File

@ -0,0 +1,9 @@
module.exports = {
main: {
dest: 'accountant/frontend/static/build/js/vendor.js',
cssDest: 'accountant/frontend/static/build/css/vendor.css',
dependencies: {
'autotype': 'jquery'
}
},
};

5
grunt-config/clean.js Normal file
View File

@ -0,0 +1,5 @@
module.exports = {
libs: [
"accountant/frontend/static/build"
]
};

15
grunt-config/concat.js Normal file
View File

@ -0,0 +1,15 @@
module.exports = {
options: {
stripBanners: false,
banner: '<%= banner %>\n',
process: function(src, filepath) {
// Add comments with original filename.
return '// ### Begin: ' + filepath + ' ### //\n' + src +
'// ### End: ' + filepath + ' ### //\n';
}
},
frontend_js: {
src: '<%= paths.frontend_js %>',
dest: '<%= paths.frontend_build %>/js/app.js'
}
};

14
grunt-config/copy.js Normal file
View File

@ -0,0 +1,14 @@
module.exports = {
"bootstrap-select.css.map": {
src: 'bower_components/bootstrap-select/dist/css/bootstrap-select.css.map',
dest: '<%= paths.frontend_build %>/css/bootstrap-select.css.map'
},
"fontawesome-webfont.woff": {
src: 'bower_components/font-awesome/fonts/fontawesome-webfont.woff',
dest: '<%= paths.frontend_build %>/fonts/fontawesome-webfont.woff'
},
"fontawesome-webfont.ttf": {
src: 'bower_components/font-awesome/fonts/fontawesome-webfont.ttf',
dest: '<%= paths.frontend_build %>/fonts/fontawesome-webfont.ttf'
}
};

9
grunt-config/jshint.js Normal file
View File

@ -0,0 +1,9 @@
module.exports = {
options: {
reporter: require('jshint-stylish')
},
work: [
'<%= paths.frontend_js %>/*.js',
'Gruntfile.js'
]
};

5
grunt-config/shell.js Normal file
View File

@ -0,0 +1,5 @@
module.exports = {
npm_install: {
command: 'npm install'
}
};

6
grunt-config/watch.js Normal file
View File

@ -0,0 +1,6 @@
module.exports = {
js: {
files: '<%= paths.frontend_js %>',
tasks: ['concat:frontend_js']
}
};