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

Add npm initializer package #635

Open
mihkeleidast opened this issue Jun 7, 2020 · 5 comments · May be fixed by #1131
Open

Add npm initializer package #635

mihkeleidast opened this issue Jun 7, 2020 · 5 comments · May be fixed by #1131

Comments

@mihkeleidast
Copy link
Member

What problem would this feature solve?

npm supports custom initializers to ease up setuping a package. If we add a package named @frctl/create-fractal, that could be used via npm init @frctl/fractal. This would essentially allow users to use the fractal new command without installing the @frctl/fractal package globally.

What the feature should look like?

Add a package named @frctl/create-fractal that does the same internal things that fractal new cli command does.

@Chapabu
Copy link
Member

Chapabu commented Jun 12, 2020

This sounds cool, but just wondering what this adds on top of something like npx @frctl/cli new. Would it add support for something like yarn create fractal-app as well without much effort?

Or (and this might be the best approach) - should we drop fractal new and just have the CLI there to serve and build? That's fine by me, as I've not got that far with the CLI yet, and we can still to the templating thing we discussed if we take this approach.

@mihkeleidast
Copy link
Member Author

This would just add a npm "industry standard" alias to npx @frctl/cli new. I don't think it's too much for us to maintain, since it would just trigger the new command. Basically how Pattern Lab does the same thing: https://github.com/pattern-lab/patternlab-node/tree/dev/packages/create

@LeBenLeBen
Copy link
Member

should we drop fractal new and just have the CLI there to serve and build?

I'd rather keep only the project scaffolding feature, that's a great thing to easily create a project that just works. As suggested, users could run it without even having to install the CLI globally with npm init or yarn create. I'd rather ditch the global serve/build tasks as they can cause issues when versions mismatches. Those can and should be run per project with dedicated scripts in the package.json.

@stale
Copy link

stale bot commented Aug 16, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the inactive label Aug 16, 2020
@mihkeleidast
Copy link
Member Author

Would it add support for something like yarn create fractal-app as well without much effort?

By the looks of it, yarn create works the same as npm init, so it would be yarn create @frctl/fractal.

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

Successfully merging a pull request may close this issue.

3 participants