accountant-ui/Gruntfile.js

56 lines
1.4 KiB
JavaScript
Raw Normal View History

2015-06-13 17:37:35 +02:00
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
require('time-grunt')(grunt);
2016-01-29 13:42:25 +01:00
var appConfig = {
app: require('./bower.json'),
dist: 'dist'
};
2015-06-13 17:37:35 +02:00
// Options
var options = {
2016-01-29 13:42:25 +01:00
accountant: appConfig,
2015-06-13 17:37:35 +02:00
config: {
src: "grunt-config/*.js"
},
paths: {
frontend_js: [
'accountant/frontend/static/js/app.js',
'accountant/frontend/static/js/accounts.js',
2015-08-21 01:12:06 +02:00
'accountant/frontend/static/js/operations.js',
2015-06-13 17:37:35 +02:00
'accountant/frontend/static/js/scheduler.js'
],
frontend_build: 'accountant/frontend/static/build'
},
pkg: grunt.file.readJSON('package.json'),
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %>\n'+
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author %> */\n',
};
var configs = require('load-grunt-configs')(grunt, options);
grunt.initConfig(configs);
grunt.registerTask('generatestatic', [
'shell:npm_install',
2016-01-29 13:42:25 +01:00
'shell:bower_install',
'wiredep:app',
2015-06-13 17:37:35 +02:00
]);
grunt.registerTask('jsdev', [
2016-01-29 13:42:25 +01:00
'newer:jshint',
'newer:jscs'
2015-06-13 17:37:35 +02:00
]);
grunt.registerTask('dev', [
'generatestatic',
'jsdev'
]);
2016-01-29 13:42:25 +01:00
grunt.registerTask('serve', [
'dev',
'bgShell:runserver',
'watch'
]);
2015-06-13 17:37:35 +02:00
};