Why must the leading slash be removed in the source file paths in order for Grunt to properly locate the files? The gruntfile is in the main project older along with the "includes" folder that contains the JS files.
module.exports = function(grunt) {
var SiteMasterHeaderArray = [
"/includes/js/knockout/knockout-3.4.0.js",
"/includes/js/common/common.js"
];
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
dest: {
files: {
'dest/SiteMasterHeader.js': SiteMasterHeaderArray
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('default', ['uglify']);
};
The destination file isn't written because (at least it appears this way to me) that Grunt is searching some other location for these files due to the "/" in the file path. Remove the slash and the function works perfectly.