-
Notifications
You must be signed in to change notification settings - Fork 58
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
Why use ~/.grunt-init? #38
Comments
What do you mean by, "Can't they be bundled with the task itself" ? I don't understand. These are templates, there are no tasks. |
Ah, good point. I hadn't realized that I think it would be nicer if the workflow were more like:
instead of having to mess with a directory that is global to all projects, and potentially deal with headaches when you want to be using different versions of |
But grunt-init templates aren't npm modules, so we don't publish them with npm. Also, when you do "npm install" you install modules locally to a project... but one of the ideas of grunt-init is that it works to initialize projects. It's a "chicken and egg" problem. |
Hmm... perhaps I'm thinking about grunt init wrong. I was thinking of it as a task, because as part of my build process I want to generate certain templated scaffolding files. Perhaps I should just be using a task instead of grunt init? |
You should be able to include the template files somewhere locally and specify |
I appreciate that they are git projects to make it easy to have custom forks but I've found that to be something I just don't care to do. For me having the latest template is a higher priority than a custom template. The NPM workflow seems pretty standard in the Node world, something like: I have nothing against git, I use it for everything, but it seems off-putting to make Git a requirement to use grunt templates. If I need something more custom I would clone the project and use npm link. |
Is there a way to load grunt-init as a task? Take this scenario, you want to generate a new Model file within an existing project. You want the templates to be within your project directory: ./project/.grunt-init/templates/model or something. It would be nice to be able to load grunt-init as a task so we can easily |
Unfortunately, no. |
@billyvg if you're in to that, you might want to check out yeoman generators. http://yeoman.io/ |
Why must the templates be installed in
~/.grunt-init
? Can't they be bundled with the task itself, like how yeoman generators do it? It seems like this adds an unnecessary step to someone using my grunt init task.The text was updated successfully, but these errors were encountered: