2016-03-24 02:03:42 +01:00
|
|
|
module.exports = function (grunt) {
|
2016-05-02 21:40:26 +02:00
|
|
|
|
2016-03-24 02:03:42 +01:00
|
|
|
grunt.initConfig({
|
|
|
|
concat: {
|
2016-05-02 21:40:26 +02:00
|
|
|
options: {
|
|
|
|
separator: ';',
|
|
|
|
},
|
|
|
|
dist: {
|
|
|
|
src: ['js/humhub.core.js', 'js/humhub.util.js', 'js/humhub.additions.js',
|
|
|
|
'js/humhub.client.js', 'js/humhub.ui.js', 'js/humhub.ui.modal.js', 'js/humhub.actions.js',
|
|
|
|
'js/humhub.content.js', 'js/humhub.stream.js'],
|
|
|
|
dest: 'js/dist/humhub.all.js'
|
|
|
|
}
|
2016-03-24 02:03:42 +01:00
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
js: {
|
|
|
|
files: ['js/*.js'],
|
|
|
|
tasks: ['build']
|
|
|
|
}
|
|
|
|
},
|
2016-04-19 15:47:05 +02:00
|
|
|
clean: ["assets/*"],
|
|
|
|
uglify: {
|
|
|
|
build: {
|
|
|
|
files: {
|
2016-05-02 21:40:26 +02:00
|
|
|
'js/dist/humhub.all.min.js': ['js/dist/humhub.all.js']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
less: {
|
|
|
|
dev: {
|
|
|
|
files: {
|
|
|
|
'themes/HumHub/css/less/theme.css': 'themes/HumHub/css/less/theme.less'
|
2016-04-19 15:47:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-03-24 02:03:42 +01:00
|
|
|
});
|
2016-05-02 21:40:26 +02:00
|
|
|
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-less');
|
2016-03-24 02:03:42 +01:00
|
|
|
grunt.loadNpmTasks('grunt-contrib-concat');
|
2016-04-19 15:47:05 +02:00
|
|
|
grunt.loadNpmTasks('grunt-contrib-uglify');
|
2016-03-24 02:03:42 +01:00
|
|
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-clean');
|
2016-05-02 21:40:26 +02:00
|
|
|
|
2016-03-24 02:03:42 +01:00
|
|
|
grunt.registerTask('default', ['watch']);
|
2016-04-19 15:47:05 +02:00
|
|
|
grunt.registerTask('build', ['concat', 'uglify', 'clean']);
|
|
|
|
};
|