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

Which style of template #86

Open
gregglind opened this issue Sep 12, 2018 · 2 comments
Open

Which style of template #86

gregglind opened this issue Sep 12, 2018 · 2 comments

Comments

@gregglind
Copy link
Contributor

Possibilities:

  1. Fork and clone, write over everything
  2. Fork and clone, remove .git
  3. Create-react-app style command line tool. (npm install -g study-init)
  4. have a '/your-addon' directory.

Let's try some things.

@pdehaan
Copy link
Contributor

pdehaan commented Sep 12, 2018

I like the create-react-app idea since it may play nicer w/ npx and npm just added support for scaffolding projects using npm init and specifying an initializer:

$ npm init react-app ./my-react-app 

(where "react-app" is an alias for "create-react-app")

But if we created and published a module named "create-shield-study", it'd be something like: $ npm init shield-study ./secret-shield-study -y and I think it'd always pull the latest published "create-shield-study" version from npm, which means new study authors would always be getting the latest version of the template and not have to install anything globally.

Ref: mozilla/shield-studies-addon-utils#196

@gregglind
Copy link
Contributor Author

gregglind commented Sep 13, 2018

I also just build one using plop (https://www.npmjs.com/package/plop) and found it very easy.

That init initializer looks awesome.

The revised flow would be:

npm init shield-study  --name some-project-name  # or study-addon or suggest me a thing :) 
# this call the create-shield-study package, which we have to publish.

I claim that in the stupidist forms, this is a two or 3 day project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants