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

recursive template listing and execution #24

jfols opened this Issue Feb 28, 2018 · 4 comments


None yet
2 participants

jfols commented Feb 28, 2018

This is just a nice to have ;)

It'd be great to have hygen at the top level of a project recursively search and list all actions spread throughout the project, current behavior only searches the current directory's _templates directory.

Here's a hasty hack I used in npm scripts:

"templates": "find . -path ./node_modules -prune -o -type d | grep '_templates/[A-z_\\-]*/[A-z_\\-]*'",

Then npm run templates yields:

> find . -path ./node_modules -prune -o -type d | grep '_templates/[A-z_\-]*/[A-z_\-]*'


The ability to execute hygen new atom from the top level of the project would be awesome.


This comment has been minimized.


jondot commented Mar 5, 2018

That's awsome!
There's at least one person I know of who's working on such a thing to contribute. Let's see what he comes up with and align to your idea 👍

@jondot jondot referenced this issue Mar 5, 2018


Roadmap #31

3 of 3 tasks complete

This comment has been minimized.


jondot commented Mar 5, 2018

Moved this to Roadmap, thanks!

@jondot jondot closed this Mar 5, 2018


This comment has been minimized.

jfols commented Mar 6, 2018

I've come up with a pretty simple solution to this--just write npm scripts. It would be cool if hygen worked like this out of the box.

    "new.action": "cd imports/client/redux; hygen new action",
    "new.reducer": "cd imports/client/redux; hygen new reducer",
    "new.atom": "cd imports/client/____atoms; hygen new atom",
    "new.molecule": "cd imports/client/___molecules; hygen new molecule",
    "new.organism": "cd imports/client/__organisms; hygen new organism",
    "new.layout": "cd imports/client/_layouts; hygen new",

This comment has been minimized.


jondot commented Mar 8, 2018

That's brilliant! 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment