accountant-ui/Gruntfile.js

76 lines
1.6 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);
// Options
var options = {
2016-02-17 09:52:13 +01:00
accountant: {
frontend: {
app: require('./bower.json'),
2016-04-12 10:55:08 +02:00
src: 'accountant-ui',
dist: 'accountant-ui_dist'
2016-02-17 09:52:13 +01:00
}
},
2016-01-29 13:42:25 +01:00
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
},
pkg: grunt.file.readJSON('package.json'),
2016-10-09 20:22:21 +02:00
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %>\n' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author %> */\n'
2015-06-13 17:37:35 +02:00
};
var configs = require('load-grunt-configs')(grunt, options);
grunt.initConfig(configs);
grunt.registerTask('dependencies', [
2016-10-09 20:33:59 +02:00
'shell:npmInstall',
'shell:bowerInstall',
'shell:pipInstall',
2016-10-09 20:22:21 +02: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-10-09 20:20:21 +02:00
'wiredep',
2016-10-12 19:57:19 +02:00
'newer:eslint'
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',
'connect:livereload',
2016-01-29 13:42:25 +01:00
'watch'
]);
grunt.registerTask('dist', [
'wiredep',
'clean:dist',
'useminPrepare',
'copy:dist',
'copy:styles',
'cssmin:generated',
2016-02-18 15:53:28 +01:00
'concat:generated',
'ngAnnotate',
'uglify:generated',
'filerev',
'usemin'
]);
2015-06-13 17:37:35 +02:00
};