2014-05-07 18:27:51 +02:00
|
|
|
module.exports = function(grunt) {
|
2014-11-12 12:14:37 +01:00
|
|
|
grunt.initConfig({
|
2016-04-21 22:13:49 +02:00
|
|
|
pkg: grunt.file.readJSON('package.json'),
|
2014-11-12 12:14:37 +01:00
|
|
|
browserify: {
|
|
|
|
dist: {
|
|
|
|
files: {
|
2017-04-23 20:02:26 +02:00
|
|
|
'lib/static/main.js': ['lib/GUI/js/main.js'],
|
2014-05-07 18:27:51 +02:00
|
|
|
},
|
2014-11-12 12:14:37 +01:00
|
|
|
options: {
|
|
|
|
debug: true,
|
2017-04-23 20:02:26 +02:00
|
|
|
transform: ['browserify-handlebars'],
|
|
|
|
},
|
|
|
|
},
|
2014-11-12 12:14:37 +01:00
|
|
|
},
|
|
|
|
less: {
|
|
|
|
dist: {
|
|
|
|
files: {
|
2017-04-23 20:02:26 +02:00
|
|
|
'lib/static/main.css': ['lib/GUI/css/main.less'],
|
2014-05-07 18:27:51 +02:00
|
|
|
},
|
2014-11-12 12:14:37 +01:00
|
|
|
options: {
|
2017-04-23 20:02:26 +02:00
|
|
|
sourceMap: false,
|
|
|
|
},
|
|
|
|
},
|
2014-11-12 12:14:37 +01:00
|
|
|
},
|
|
|
|
watch: {
|
2017-04-23 20:02:26 +02:00
|
|
|
files: ['lib/GUI/**/*'],
|
|
|
|
tasks: ['default'],
|
|
|
|
},
|
|
|
|
});
|
2014-05-07 18:27:51 +02:00
|
|
|
|
2017-04-23 20:02:26 +02:00
|
|
|
grunt.loadNpmTasks('grunt-browserify');
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-less');
|
2014-05-07 18:27:51 +02:00
|
|
|
|
2014-11-12 12:14:37 +01:00
|
|
|
grunt.registerTask('default', [
|
|
|
|
'browserify',
|
2017-04-23 20:02:26 +02:00
|
|
|
'less',
|
|
|
|
]);
|
|
|
|
};
|