-
Notifications
You must be signed in to change notification settings - Fork 19
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 "new" command for scaffolding projects #15
Conversation
@mbpolan love it. Can you expand a little on how the templates work? For example, could any of the examples be a template? |
@tiny-dancer The idea with these templates is to set up a "starter" project based on the choices the user makes in the prompts, similar to how CRA/expo will initialize a working project for you to start hacking. Right now, this just creates the necessary runiac config files and skeleton directories. Ideally I'd like to bootstrap these with something like the examples, just haven't settled on an approach yet. I've looked at a few ideas on how to bundle those static files with our CLI. The most promising feature is the embed package, but that requires Go 1.16. For our version of Go, some possibilities include a packager like rice. Was planning on this being the next iteration of this feature. |
@mbpolan hugo or gatsby might be a good reference here as well. TL/DR instead of bundling with the cli pull over the wire in a conventionalized way. that could lead to something like https://www.gatsbyjs.com/starters/ |
@tiny-dancer I've reworked this PR a bit to be more general. I also dropped the command line arguments I originally had in favor of interactive prompts. A user can now run
|
In conjunction with this pull request will also be looking to have the default container be set to a |
Also take note runiac.io and docs have a repo of their own: https://github.com/runiac/website |
@tiny-dancer Makes sense to me. I swapped the default container to |
Unit Test Results 1 files 15 suites 0s ⏱️ Results for commit e542a38. ♻️ This comment has been updated with latest results. |
Proposed changes
This PR adds a
new
command to the CLI. The intent is to quickly scaffold a new runiac project with recommended directory structures. The usage is to runruniac new
and let the interactive prompts guide the user. Depending on the choices the user makes, the following actions are done:git init
is run if it is installed and the user chooses to use itruniac.yml
is createdentrypoint.sh
is createdruniac init
is executed in the target directory with the correct base Docker imageOutput of a custom scaffold using a single set of steps:
Output of a custom scaffold using the
tracks
template:Issues for these changes
N/A
Types of changes
Checklist
README.md
,CHANGELOG.md
, etc. - if appropriate)Dependencies and Blockers
N/A
Relevant Links
N/A
Further comments
Much of this
new
command takes inspiration from other various CLIs, includingexpo init
andnpm init
. The idea is to give the user either guided prompts to give answers, or command line arguments for powerusers.