-
Notifications
You must be signed in to change notification settings - Fork 0
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
build.bootstrap could take grunt.initConfig obj as param #1
Comments
I see what you're getting it here but it only solves half the There a couple problems here:
Calling This doesn't mean we can't still pass the paths object into bootstrap, but we'd then also need to pass it into the All in all to be safe |
Sure, I figured there would be complexities. My real point is that comments of "dont do this or bad things will happen!" is a failing of the API. Build tools already has access to the grunt module, can it inspect grunt to see if its received its config and exit gracefully (with a meaningful error message) if it has not? |
I'm not sure I'm following. The only mechanism we have for determining what plugins are being used, is simply inferring it from the config that's been set. So if For example if an application is already using sass in Gruntfile, then they're almost certainly going to have something like this: grunt.initConfig({
sass: {
dist: {
files: [{
expand: true,
cwd: 'styles',
src: ['*.scss'],
dest: '../public',
ext: '.css'
}]
}
}
}); If you call I agree it's not ideal. A possible solution is to clone the config, and reinitialise it with the old values. I'm fairly sure it'll work, but I'm not confident there won't be unintended side effects. It's worth looking into and should probably be it's own ticket. |
This would prevent the need for "call grunt.initConfig first!" warnings in the docs.
build
would simply call grunt.initConfig internally.The text was updated successfully, but these errors were encountered: