-
Notifications
You must be signed in to change notification settings - Fork 148
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
more flexible config #7
Comments
You should be able to specify multiple targets and reference them with You can also rename tasks with grunt.renameTask or simply register a new task to point to one or more other tasks: |
Also, the option thing is already built into grunt 0.4. Just do: connect: {
options: {
keepalive: true
}
dev: {
options: {
port: 3010,
base: 'app/public'
}
},
dist: {
options: {
port: 3011,
base: 'dist/public'
}
}
}, |
Yeah but did you test it? It doesn't seem to work. It is due to the way you retrieve the config:
It doesn't follow the task definition, if the task isn't called connect, the config is not used. Edit: Am using grunt 0.4. |
Oh you're right @sebv. It looks like that changed in this commit. I'm not sure why. |
Better ask sindre for advice, there should be guidelines from grunt on the best way to get the config. But I've debugged it, the problem now is that your config return a complex configuration object rather than flat options. |
@cowboy Why the change to not support targets? |
I don't think it ever supported targets. But it totally can, now's the time to do it! Want to make a PR? |
@cowboy I'm pretty sure it did before this commit ccd5ab9#L7L21 |
Let me know what you think of my changes! |
Right now configuration is not flexible, would be good to be able to declare several server config or even rename the task to
server
for example, without having to for your own task.The change below would let you configure like this:
The change below would let you change the task name (maybe there is a better way)
The text was updated successfully, but these errors were encountered: