Open ncphillips opened 6 years ago
Our current thought is that different templates will be created as separate static-scripts
.
There are currently 3 scripts in mind:
static-scripts
static-scripts-hugo
static-scripts-jekyll
I think the goal of this project should be:
In CRA, the packages are all interdependent, not standalone versions. To create your own version of CRA (i.e, change the template or build scripts) you need to fork the monorepo and pass a flag when using CRA.
I feel like this repository should work like that. All of the packages are related to core functionality of our best-practices, and templates are provided either:
If developers want to define a completely different zero-config build pipeline, they fork the project, make changes, and then publish as a new NPM package/Git repo.
This can then be used in C-S-S via --scripts-version THIRD_PARTY_SCRIPT_NAME
THIRD_PARTY_SCRIPT_NAME
is NPM package name.THIRD_PARTY_SCRIPT_NAME
can be formatted as user/repo#feature\/branch
. See https://docs.npmjs.com/files/package.json#github-urlsTHIRD_PARTY_SCRIPT_NAME
can be formatted as <protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>[#<commit-ish> | #semver:<semver>]
. See Git URLs as DependenciesCore templates are stored in aliases to valid http endpoints. (See [external templates)[#external-templates])
If third-party developers want to create new templates they can:
.git/
folder to the CWD, and then delete the tmp dir.Another thought -- should we rename templates to generators?
For all intents and purposes, all templates should be a "generator". Even if it's a project using react, react-router and renderToString() to generate the HTML, or just mustache templates, that's an SSG.
The site templates for Jekyll and Hugo are being deployed to nominate and downloaded into the users NPM modules. They should definitely be moved out of static-scripts, but they might continue live in this repository. I think it would be preferable git urls could be passed in as a template, and the template only be fetched on Init. This would allow for third party templates to be easily createable