Wrapping files: {}
in my_target: {}
solved my problem.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
my_target: {
files: {
'../build/all.min.js':['../js/config.js']
}
},
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n',
report: true
}
}
});
^--- the new version of that initConfig.
It should also be noted that my_target
could be anything, and is used by default since it is the only uglify profile supplied. If i had supplied more than one profile, i.e. "test: {}, prod: {}, etc: {}", then I would refer to them after the task in the following way: uglify:test
, uglify:prod
, uglify:etc