Skip to content
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

Template repository support #97

Open
dploeger opened this issue Nov 4, 2015 · 1 comment
Open

Template repository support #97

dploeger opened this issue Nov 4, 2015 · 1 comment

Comments

@dploeger
Copy link

dploeger commented Nov 4, 2015

It would be nice, if grunt-init would support downloading templates from a central repository (npmjs for example), when the template isn't available locally.

This would mean:

  • Correctly labeling (i.e. grunt-init-template) all available packages in npmjs
  • Implementing a method of searching with npm, when the template isn't available locally
  • If only one template is returned from that search, install the package to ~/.grunt-init (after asking the user)
  • Use that template
@dploeger
Copy link
Author

dploeger commented Nov 4, 2015

One could directly use npm for searching and installing. The bad side is, that you have to wrap around the cli as the api isn't considered stable.

The workflow would be:

  • Is the template available?
    • Yes: Install the template
    • No: Search using npm for a specific label (the filtering by label feature is currently missing from npm, though)
      • Is there at least one package?
        • Yes: Is it only one package?
          • Yes: Install it
          • No: Output the search result and let the user decide
        • No: Output error message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant