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

next init as a separate module? #531

Closed
rauchg opened this issue Dec 26, 2016 · 21 comments
Closed

next init as a separate module? #531

rauchg opened this issue Dec 26, 2016 · 21 comments
Labels
good first issue Easy to fix issues, good for newcomers

Comments

@rauchg
Copy link
Member

rauchg commented Dec 26, 2016

I don't want next init to stagnate, be opinionated, etc. The solution is perhaps to remove it.

How would you all feel about making next init an optional, installable command that comes from a different package?

npm install -g next-init

It would expose a global bin next-init. The cool thing about making it a separate module is that we can iterate on it independently, and add more features frequently.

Some ideas for the future.

next-init --preact --glamor
next-init --inferno --styletron

If anyone would be interested in leading this project, please let me know as well

Another discussion I'll open later is to take the same approach for compiling a next app into static files, via next-export.

@impronunciable
Copy link
Contributor

How about a yeoman script?

@rauchg
Copy link
Member Author

rauchg commented Dec 29, 2016

I haven't looked at that yet, but if it satisfies our need to support "flags", and it's well supported, easy to use, easy to get started with, it sounds like a winner!

@arunoda
Copy link
Contributor

arunoda commented Dec 30, 2016

@rauchg it support tags and many more cool features.

@ntwcklng
Copy link
Contributor

ntwcklng commented Dec 31, 2016

@rauchg i would love to be part of this project, should i create a draft?
Maybe next-new would be a better name for creating new projects. We could add an --init option for creating the new project in the current dir.

@rauchg
Copy link
Member Author

rauchg commented Dec 31, 2016

@ntwcklng you're absolutely welcome to. next-new is a great name as well. Maybe it could even install a nn alias :D

But as said above, it'd be interesting to compare pros/cons of nn as a yo extension vs standalone

@ntwcklng
Copy link
Contributor

ntwcklng commented Jan 1, 2017

Awesome!
For me the standalone module would win the race. Its the standard-zeit-way - straightforward and lightweight:

$ npm install -g next-new
$ nn my-new-blog --glamor
> created my-new-blog (with: glamor)
> run `$ cd my-new-blog && npm start` to get startet

With Yeoman you have to install 2 global dependencies.

@ntwcklng
Copy link
Contributor

ntwcklng commented Jan 1, 2017

Could look like this: https://github.com/ntwcklng/next-new

nn2

@ntwcklng
Copy link
Contributor

Any other opinions? I would love to see that thing in production 😄

@timneutkens
Copy link
Member

@ntwcklng that looks pretty neat 😄

@timneutkens
Copy link
Member

@rauchg @arunoda As we all know Segment made create-next-app (https://open.segment.com/create-next-app) which is pretty neat. Maybe we should remove next init and leave this in userland?

@sergiodxa
Copy link
Contributor

I'm with @timneutkens, create-next-app it's awesome, it's integrated with yarn create and allow the user to start from an example so it's possible to keep adding examples and CNA it's going to have more and more options.

@arunoda
Copy link
Contributor

arunoda commented Jun 12, 2017

@timneutkens I like that idea. Yeah send a PR :)

@timneutkens timneutkens added good first issue Easy to fix issues, good for newcomers Status: Help Wanted labels Jul 8, 2017
@chabou
Copy link

chabou commented Jul 9, 2017

Do you want to recommend yarn create next-app my-project or create-next-app in next -h? Or remove init command without any explaination about how to start a next project?

@timneutkens
Copy link
Member

Lets just log out a message that it's deprecated and you can use create-next-app.

@ragingwind
Copy link
Contributor

I'm interested in this issue. First of all, I love that using create-next-app for zero-configuration setup like create-react-app but It's not enough opened to folks who want to make own version of next app. As I know that create-next-app doesn't support templates(like vue-cli) or generators in the outside world(like yeoman or webpack).

How about using vue-cli template system. Conceptually, It's very similar to yo/yeoman-generator but rather than simple and straight in terms of using templates. For example, supporting github repo directly. It make next init to be more less opinionated in my point of view. I would like to make PoC version for this, any thought?

@timneutkens
Copy link
Member

timneutkens commented Jul 9, 2017

@ragingwind I like the idea 👍, though most people will just want to start off using one of the examples though, and create-next-app provides that. It also has a default similar to next init, which is fine. What you're proposing can obviously be an external tool though 👌 We're basically just removing bloat from the next codebase 👍

@ragingwind
Copy link
Contributor

ragingwind commented Jul 9, 2017

@timneutkens I see that the point of removing init from next. Have you guys decided to use create-next-app with next.js example instead of next init? Then I'm concern that

  • examples is great but It downloads only static files from the repo, which can't be combinable as a whole of an app. For example, next-init --preact --glamor
  • No template and prompting mean that there are no any custom configurations even project-name in package.json. The user need to fix every time as it is generated. It's so bothering to me

@timneutkens
Copy link
Member

@ragingwind it's currently the only Next.js generator out there, both ways, next init was never documented, and the deprecation message is only for when people use it. It's still their decision to use create-next-app (or not) 😄 I'd love to see what you're proposing though, combining examples would be amazing 👌

@ragingwind
Copy link
Contributor

@timneutkens I understand that this issue good for beginner :0 I will show off the another generator

@timneutkens
Copy link
Member

@ragingwind 👍 💯

@ragingwind
Copy link
Contributor

ragingwind commented Aug 17, 2017

@timneutkens I've made a PoC version of next-init https://www.npmjs.com/package/next-init Please take a look

timneutkens pushed a commit that referenced this issue Aug 24, 2017
@lock lock bot locked as resolved and limited conversation to collaborators May 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Easy to fix issues, good for newcomers
Projects
None yet
Development

No branches or pull requests

8 participants