CartoAssets/Gruntfile.js

35 lines
753 B
JavaScript
Raw Normal View History

2016-01-14 20:57:13 +08:00
module.exports = function (grunt) {
2016-01-14 19:14:43 +08:00
require('load-grunt-tasks')(grunt);
grunt.initConfig({
2016-01-14 20:57:13 +08:00
concat: require('./tasks/concat'),
connect: require('./tasks/connect'),
clean: require('./tasks/clean'),
sass: require('./tasks/sass'),
cssmin: require('./tasks/cssmin'),
shell: require('./tasks/shell'),
watch: require('./tasks/watch')
2016-01-14 19:14:43 +08:00
});
2016-01-14 19:50:33 +08:00
var baseTasks = [
'clean',
'sass',
'concat',
'cssmin'
];
var devTasks = baseTasks.concat([
2016-01-14 21:48:25 +08:00
'shell',
2016-01-14 19:50:33 +08:00
'connect',
'watch:scss'
]);
grunt.event.on('watch', function (action, filepath) {
grunt.task.run('shell');
});
2016-01-14 19:14:43 +08:00
2016-01-14 19:50:33 +08:00
grunt.registerTask('dev', devTasks);
grunt.registerTask('build', baseTasks);
grunt.registerTask('default', baseTasks);
2016-01-14 20:57:13 +08:00
};