accountant-ui/Gruntfile.js

66 lines
1.4 KiB
JavaScript
Raw Normal View History

2016-02-08 00:24:10 +01:00
'use strict';
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: {
2016-02-08 00:24:10 +01:00
src: 'grunt-config/*.js'
2015-06-13 17:37:35 +02:00
},
paths: {
frontend_js: [
2016-02-08 00:24:10 +01:00
'accountant/frontend/static/js/*.js'
2015-06-13 17:37:35 +02:00
],
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('dependencies', [
2015-06-13 17:37:35 +02:00
'shell:npm_install',
2016-01-29 13:42:25 +01:00
'shell:bower_install',
'shell:pip_install',
2016-01-29 13:42:25 +01:00
'wiredep:app',
2015-06-13 17:37:35 +02:00
]);
2016-02-01 21:56:49 +01:00
grunt.registerTask('pydev', [
'newer:flake8'
]);
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
]);
2016-02-01 21:56:49 +01:00
grunt.registerTask('htmldev', [
'newer:htmllint'
]);
2015-06-13 17:37:35 +02:00
grunt.registerTask('dev', [
'dependencies',
2016-02-01 21:56:49 +01:00
'pydev',
'jsdev',
'htmldev'
2015-06-13 17:37:35 +02:00
]);
2016-01-29 13:42:25 +01:00
grunt.registerTask('serve', [
'dev',
'bgShell:runserver',
'watch'
]);
2015-06-13 17:37:35 +02:00
};