diff options
Diffstat (limited to 'Gruntfile.js')
-rw-r--r-- | Gruntfile.js | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..4993def --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,64 @@ +module.exports = function(grunt) { + + // Project configuration. + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + concat: { + js: { + src: [ + 'www/js/dropzone.js', + 'www/js/apps.js', + 'www/js/auth.js', + 'www/js/clock.js', + 'www/js/importer.js', + 'www/js/jingles.js', + 'www/js/musicgrid.js', + 'www/js/musicpools.js', + 'www/js/rivendell.js', + 'www/js/rivendell.rh.js', + 'www/js/shows.js', + 'www/js/utils.js' + ], + dest: 'www/js/<%= pkg.name %>.js' + }, + css: { + src: [ + 'www/styles/auth.css', + 'www/styles/jingles.css', + 'www/styles/main-style.css', + 'www/styles/musicgrid.css', + 'www/styles/shows.css' + ], + dest: 'www/styles/<%= pkg.name %>.css' + } + }, + uglify: { + options: { + banner: '/*! <%= pkg.name %> */\n' + }, + build: { + src: 'www/js/<%= pkg.name %>.js', + dest: 'www/js/<%= pkg.name %>.min.js' + } + }, + cssmin: { + target: { + files: [{ + expand: true, + cwd: 'www/styles', + src: '<%= pkg.name %>.css', + dest: 'www/styles', + ext: '.min.css' + }] + } + } + }); + + // Load the plugin that provides the "uglify" task. + grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-cssmin'); + + // Default task(s). + grunt.registerTask('default', ['concat', 'uglify', 'cssmin']); +}; |