0

I am using uglify in Grunt to minify and concatenate my javascript files. I have stored the filepaths of those js files in a file called "loadlist". I was wondering if there is any way I can make pass "loadlist" to uglify so that it can read and process them.

grunt.initConfig({
 uglify: {
   my_target: {
     files: {
        'dest/output.min.js': ['src/input1.js', 'src/input2.js']
     }
   }
 }
});

The sample "loadlist" will file looks like this:-
src/input1.js 
src/input2.js

NOTE 1 : The above is just for the sake of an example. The actual loadlist is actually pretty large

Thank you

Alcides Queiroz
  • 9,456
  • 3
  • 28
  • 43
cepsr
  • 1
  • 1
  • You can use `fs` to read the `loadlist` file line by line and pass each into uglify: http://nodejs.org/api/fs.html – mash Jul 20 '14 at 01:35
  • Not to deviate from the topic, I find ``gulp`` better in such situations, ``code over configurations``. – Sarbbottam Jul 20 '14 at 01:50

0 Answers0