mirror of
https://github.com/lxsang/antos-frontend.git
synced 2024-10-01 20:16:41 +02:00
62 lines
1.9 KiB
JavaScript
62 lines
1.9 KiB
JavaScript
module.exports = function (grunt) {
|
|
|
|
//console.log(grunt.file.readJSON('src/build.json'))
|
|
var buildconf = grunt.file.readJSON('src/build.json')
|
|
// Project configuration.
|
|
grunt.initConfig({
|
|
pkg: grunt.file.readJSON('package.json'),
|
|
uglify: {
|
|
options: {
|
|
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
|
|
},
|
|
build: {
|
|
src: 'build/htdocs/<%= pkg.name %>.js',
|
|
dest: 'build/htdocs/<%= pkg.name %>.min.js'
|
|
}
|
|
},
|
|
coffee: {
|
|
compile: {
|
|
files: {
|
|
'build/htdocs/<%= pkg.name %>.js': buildconf.coffee
|
|
}
|
|
}
|
|
/*,
|
|
glob_to_multiple: {
|
|
expand: true,
|
|
flatten: true,
|
|
cwd: 'src/',
|
|
src: ['*.coffee'],
|
|
dest: 'build/htdocs/',
|
|
ext: '.js'
|
|
}*/
|
|
},
|
|
copy: {
|
|
main: {
|
|
files: buildconf.copy
|
|
},
|
|
},
|
|
concat: {
|
|
tags: {
|
|
src: buildconf.tags,
|
|
dest: 'build/htdocs/resources/tags/antos_tags.js'
|
|
},
|
|
themes:{
|
|
src:buildconf.themes,
|
|
dest:'build/htdocs/resources/themes/antos/antos.css'
|
|
}
|
|
},
|
|
clean: ['build/htdocs/*']
|
|
});
|
|
|
|
// Load the plugin that provides the "uglify" task.
|
|
grunt.loadNpmTasks('grunt-contrib-uglify');
|
|
// coffee support
|
|
grunt.loadNpmTasks('grunt-contrib-coffee');
|
|
// Default task(s).
|
|
grunt.loadNpmTasks('grunt-contrib-clean');
|
|
grunt.loadNpmTasks('grunt-contrib-copy');
|
|
grunt.loadNpmTasks('grunt-contrib-concat');
|
|
|
|
grunt.registerTask('default', ['coffee']);
|
|
grunt.registerTask('build', ['coffee:compile', 'copy:main', 'concat:tags', 'concat:themes']);
|
|
}; |