Background
I just started using grunts about 30 minutes ago. So bear with me.
But I have a pretty simple script transition that will look at my js and then compress it all into a single file for me.
the code
"use strict"; module.exports = function (grunt) { // load all grunt tasks require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), uglify: { options: { beautify: true, report: 'gzip' }, build: { src: ['docroot/js/*.js', 'docroot/components/pages/*.js', 'docroot/components/plugins/*.js'], dest: 'docroot/js/main.min.js' } }, watch: { options: { dateFormat: function(time) { grunt.log.writeln('The watch finished in ' + time + 'ms at' + (new Date()).toString()); grunt.log.writeln('Waiting for more changes...'); } }, js: { files: '<%= uglify.build.src %>', tasks: ['uglify'] } } }); grunt.registerTask('default', 'watch'); }
Question
My main.min.js is included in the compilation every time. The value of my min.js gets 2x, 4x, 8x, 16x, etc. Etc. Is it best to add an exception and ignore main.min.js ?
Jamie Hutber Aug 26 '13 at 22:19 2013-08-26 22:19
source share