Skip to content

Conversation

@flybayer
Copy link
Contributor

This addresses some things I was first confused by and some common confusions like the .next directory.

It also adds a Contributing and Background & Design Philosophy section.

@rauchg
Copy link
Member

rauchg commented Oct 29, 2016

Needs rebase since we improved the first section already. The rest should be interesting though!

@flybayer
Copy link
Contributor Author

@rauchg rebased!

As you can see, I propose abandoning npm run dev in favor of using npm start for development (same as Hyper.app, create-react-app, etc.). Then use scripts.now-start for production. I've found I really like using scripts.now-start because it's very clear what it's for.

@sedubois
Copy link
Contributor

sedubois commented Nov 1, 2016

Shouldn't scripts.start be reserved for the production start? Like mentioned here: https://zeit.co/blog/now-static#single-page-applications

@flybayer
Copy link
Contributor Author

flybayer commented Nov 1, 2016

@sedubois, see the *Side Note:* right below that blog post section. As documented here, now will first use now-start and now-build if they're available.

@zpnk
Copy link
Contributor

zpnk commented Nov 17, 2016

@flybayer now-start as the production start command may not make sense here given that next can be deployed to any platform.

@rauchg
Copy link
Member

rauchg commented Nov 17, 2016

Honestly I like the idea of being explicit about development. We routinely get error reports from people trying to launch dev environments to production (not just to now, but really we've seen every PaaS).

This problem is similarly experienced with React, where the default script is the dev build, and production is .min.js, which leads to a lot of people deploying dev code to production or running (and blogging about) inaccurate benchmarks.

@flybayer
Copy link
Contributor Author

Ok, I've updated this PR to use scripts.dev for development instead of scripts.start.

README.md Outdated
"dependencies": {
"next": "latest"
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could be step 1 or 2, and then we use npm install? Otherwise this overrides the value of --save

Copy link
Member

@rauchg rauchg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can still improve the 1,2,3 I think

@flybayer
Copy link
Contributor Author

@rauchg I reworked the beginning a bit. Do you like this better?

2. Install the dependencies: `npm install`
3. Build and test the code: `npm test`

After that, you'll see the binaries in the `./dist/` folder.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest to add more items to this list.

  1. Run npm link to link the local repo to NPM
  2. Run npm run build in a new terminal to build and watch for code changes
  3. Then npm link this repo inside any example app with npm link next
  4. Then you can run your example app with local version of Next.js
    (You may need to re-run example app as you change code in the Next.js repo)

@rauchg
Copy link
Member

rauchg commented Jan 5, 2017

I believe we've improved this now. A better Contributing section in a different PR would be sweet though

@rauchg rauchg closed this Jan 5, 2017
@timneutkens timneutkens mentioned this pull request Feb 5, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants