From 51ee3964c0f799fa9786ddd85b54707c43cd3509 Mon Sep 17 00:00:00 2001 From: Christian Vogeley Date: Tue, 25 Mar 2014 19:36:44 +0100 Subject: Well, if you want to add a color picker it is indeed a good idea to include the color picker. --- library/bootstrap-colorpicker/Gruntfile.js | 129 +++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 library/bootstrap-colorpicker/Gruntfile.js (limited to 'library/bootstrap-colorpicker/Gruntfile.js') diff --git a/library/bootstrap-colorpicker/Gruntfile.js b/library/bootstrap-colorpicker/Gruntfile.js new file mode 100644 index 000000000..597a1c8e4 --- /dev/null +++ b/library/bootstrap-colorpicker/Gruntfile.js @@ -0,0 +1,129 @@ +'use strict'; +module.exports = function(grunt) { + + grunt.initConfig({ + recess: { + dist: { + options: { + compile: true, + compress: false + }, + files: { + 'dist/css/bootstrap-colorpicker.css': [ + 'src/less/colorpicker.less' + ] + } + }, + distMin: { + options: { + compile: true, + compress: true + }, + files: { + 'dist/css/bootstrap-colorpicker.min.css': [ + 'src/less/colorpicker.less' + ] + } + } + }, + jshint: { + options: { + jshintrc: '.jshintrc' + }, + files: [ + 'Gruntfile.js', + 'src/js/commits.js', + 'src/js/docs.js', + 'dist/js/*.js' + ] + }, + jsbeautifier: { + htmlFiles: ['index.html'], + srcFiles: ['src/js/*.js'], + distFiles: ['dist/js/bootstrap-colorpicker.js'] + }, + combine: { + dist: { + input: 'src/js/colorpicker.js', + output: 'dist/js/bootstrap-colorpicker.js', + tokens: [{ + token: "'{{color}}';", + file: 'src/js/colorpicker-color.js', + }] + } + }, + uglify: { + dist: { + files: { + 'dist/js/bootstrap-colorpicker.min.js': [ + 'dist/js/bootstrap-colorpicker.js' + ] + } + } + }, + bake: { + options: { + condense: true, + indent: 4 + }, + dist: { + files: { + 'index.html': ['src/docs.html'] + } + } + }, + watch: { + less: { + files: [ + 'src/less/*.less' + ], + tasks: ['recess'] + }, + js: { + files: [ + 'src/js/*.js' + ], + tasks: ['jsbeautifier:srcFiles', 'combine', 'jsbeautifier:distFiles', 'uglify', 'jshint'] + }, + html: { + files: [ + 'src/*.html' + ], + tasks: ['bake', 'jsbeautifier:htmlFiles'] + } + }, + clean: { + dist: [ + 'index.html', + 'dist/css', + 'dist/js/*.js' + ] + } + }); + + // Load tasks + grunt.loadNpmTasks('grunt-contrib-clean'); + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-bake'); + grunt.loadNpmTasks('grunt-recess'); + grunt.loadNpmTasks('grunt-jsbeautifier'); + grunt.loadNpmTasks('grunt-combine'); + + // Register tasks + grunt.registerTask('default', [ + 'clean', + 'recess', + 'jsbeautifier:srcFiles', + 'combine', + 'jsbeautifier:distFiles', + 'uglify', + 'bake', + 'jsbeautifier:htmlFiles' + ]); + grunt.registerTask('dev', [ + 'watch' + ]); + +}; \ No newline at end of file -- cgit v1.2.3