-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing src file silently ignored (even with nonull) #57
Comments
So you were close but here is the corrected config: module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
all: {
nonull: true,
dest: 'all.con.js',
src: [
'.bower/bootstrap/dist/js/bootstrap.js',
'.bower/jquery.ui/ui/jquery.ui.core.js',
'.bower/jquery.ui/ui/jquery.ui.effect.js',
'.bower/jquery.ui/ui/jquery.ui.effect-drop.js',
'xxxxxxxxxx.js',
'src/main/javascript/application.js'
],
},
},
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.registerTask('default', ['concat']);
}; |
Ah, that does indeed work. Thank you for the help! |
I noticed "nonull" works for the format:
But not in this alternate format:
Is this considered a bug? Or are there other reasons why "nonull" wouldn't apply in the other format? Thanks |
@leslc An example with using concat: {
all: {
files: [
{ src: 'xxxx.js', dest: 'all.con.js', nonull: true },
{ src: 'xxxx.js', dest: 'all2.con.js', nonull: false },
],
},
}, Of course, if you're not specifying multiple |
Thank you, @shama ! I didn't know about this alternate way to specify multiple files. It works great and I prefer this syntax as well. Thanks! |
Hello. I'm new to Grunt so I apologise if I'm doing something stupid.
I see there's been some discussion on concat ignoring missing files and I keep reading that if
nonull
is set to true then there is at least a warning. I've tried settingnonull
to true but it's not making a difference for me. There's no indication at all that a file doesn't exist.My
Gruntfile.js
Obviously
xxxxxxxxxx.js
doesn't exist.This is the output:
The text was updated successfully, but these errors were encountered: