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

Add configuration feature for generator and subgenerator pre/post hooks. #460

Closed
spaceribs opened this issue Jan 10, 2014 · 6 comments
Closed

Comments

@spaceribs
Copy link

This is a feature request for implementing generator pre and post hooks for running shell or node commands when scaffolding applications. It was originally opened here: yeoman/yeoman#1069

In that issue, we determined that a file such as "Yohooks.js" could be placed in the same folder and could be used for the following test cases:

  • Enforcing good standards before building more
  • Making sure that yeoman subgenerators have associated version control commits so they can be rolled
  • Being able to automatically reformat templates after they have been generated.
  • Being able to run a preflight check before yeoman builds.

The file itself is made to be environmental, and not something that is integrated directly into a generator per say.

@addyosmani
Copy link
Member

cc @SBoudrias

@SBoudrias
Copy link
Member

I don't think this would fit in our next priorities (PR are welcomed though), but we can keep the idea.

Although, using a hook file is not something I'd agree with. At most, maybe we could allow hooks being passed as action on the terminal: yo angular --after ./hooks/post-yo.js

@spaceribs
Copy link
Author

Makes sense priority-wise, but I think there are quite a few use cases that should cover many of the features that should be relegated to other node applications. One of the features that I know has been suggested before in the past is the fact that the yeoman scaffolding engine creates everything in with 2 spaced tabbing, it would be great if I could automate that to my liking after the generator is done, or have a standard commit message for scaffolding specific changes that isn't entirely manual.

@SBoudrias
Copy link
Member

Check this issue: #285

Any help is welcome. The architecture is there and customizing spacing should be trivial to implement. Generator-BBB does it, you'd only need to add this into core.

@ryandeussing
Copy link

+1 for being able to modify indents (type, number) upon scaffolding a new app

@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2020

This issue is stale because it has been open 15 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions bot added the stale label Jan 2, 2020
@github-actions github-actions bot closed this as completed Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants