Code Monkey home page Code Monkey logo

Comments (9)

cowboy avatar cowboy commented on August 29, 2024

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.

from grunt-init.

NickHeiner avatar NickHeiner commented on August 29, 2024

Ah, good point. I hadn't realized that grunt-init-* projects weren't just tasks.

I think it would be nicer if the workflow were more like:

$ npm install grunt-init
$ npm install grunt-init-foo

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 grunt-init-foo with different projects.

from grunt-init.

cowboy avatar cowboy commented on August 29, 2024

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.

from grunt-init.

NickHeiner avatar NickHeiner commented on August 29, 2024

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?

from grunt-init.

cowboy avatar cowboy commented on August 29, 2024

You should be able to include the template files somewhere locally and specify grunt-init ./path/to/template.

from grunt-init.

dylang avatar dylang commented on August 29, 2024

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: npm -g install grunt-init grunt-init-gruntfile; grunt-init gruntfile. And npm -g update to get the latest versions of the templates.

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.

from grunt-init.

billyvg avatar billyvg commented on August 29, 2024

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 grunt init model within the project directory.

from grunt-init.

cowboy avatar cowboy commented on August 29, 2024

Unfortunately, no.

from grunt-init.

NickHeiner avatar NickHeiner commented on August 29, 2024

@billyvg if you're in to that, you might want to check out yeoman generators. http://yeoman.io/

from grunt-init.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.