Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Migrate to create-* npm package #59

Open
flut1 opened this issue Jun 6, 2019 · 3 comments
Open

Migrate to create-* npm package #59

flut1 opened this issue Jun 6, 2019 · 3 comments

Comments

@flut1
Copy link
Contributor

flut1 commented Jun 6, 2019

Yarn has a create command that will install a npm package globally and then run its binary. I think we should consider migrating seng-boilerplate to work with this format, for multiple reasons:

  • Running a script is quicker than manually checking out a repository and renaming the folder
  • Having the script be accessible through a quick yarn create command, and additionally being able to run it through npx create-*, is even easier to use
  • Currently, a lot of find/replace has to be done to remove occurrences of seng-boilerplate and replacing them with the new package name. This costs a lot of time. Ideally, this is automated with a CLI
  • Some replacements are often overlooked. Most notably, the license file, which should definitely not always be copied verbatim.
  • Publishing our boilerplate to a repository may allow us to offload certain configuration to a separate package, similarly to create-react-app. This will allow us to more easily upgrade tooling in libraries created using seng-boilerplate.
@ThaNarie
Copy link
Member

ThaNarie commented Jun 6, 2019

We already have a yeoman generator that takes care of the first 4 points this automatically, although I don't mind supporting yarn/npx that way if it's more convenient.

If we do the last bit, we would also need an eject option, but I think that's something for a separate ticket.

@flut1
Copy link
Contributor Author

flut1 commented Jun 6, 2019

I forgot one of my most important points:

  • The readme currently doesn't reflect the boilerplate itself. It represents the template for new packages.

I get that this can also be resolved using a yeoman generator, but I think the readme that comes up at the "homepage" of the github repository when you look it up, should be a clear explanation of what the boilerplate is rather than a template file.

@flut1
Copy link
Contributor Author

flut1 commented Jun 6, 2019

If we do the last bit, we would also need an eject option

this is indeed a future discussion (something for a separate ticket), but in my view I would definitely be more conservative than create-react-app with how many configuration would be offloaded to separate packages. create-react-app is targeted at a different audience, and I don't think our boilerplate really needs to be as accessible, as it is aimed at library developers. It would already be a win to only move the dev-dependencies to a separate package (so not the config itself, just the dependency), so that we can more easily do security updates.

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

No branches or pull requests

2 participants