-
Notifications
You must be signed in to change notification settings - Fork 12k
feat: Use JSON file to create a NEW project and to GENERATE components, routes, directives, etc. #1039
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
Conversation
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
CLAs look good, thanks! |
Heya, we've made some massive changes in the build system in #1455, you might want to rebase to make sure your PR still works! |
@kenhansen01 - any plans to rebase and continue this? Would also be great to have option to generate interfaces & modules and have various |
@kenhansen01 I appreciate your efforts with the work you have put into this, but I feel like this is outside the current scope of the CLI. The current approach for this would be to create an external script to automate the CLI. The idea itself is sound and will be considered in the future. Thanks again for your efforts. |
Fair enough. I was having trouble finding the time to rework and rebase with all of the changes since I started work on this was started. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I created a new command in the ng2 commands folder. It looks for a file named ng-project.json, then sychronously goes through and creates the project and as many routes, components, directives, etc as are set up in the json file.
These are executed through child_process.execSync,
To use the command. Save a JSON file and run:
There is also a model for the json file (a Typescript interface) that shows all the options. It should be set up like this (options with '?' are optional):
I am working on a way to skip existing items and only add new ones if the json is changed.