Commit graph

62 commits

Author SHA1 Message Date
JJ Kasper
1420dd9a09
Update missed yarn -> pnpm in contributing (#37370)
* Update missed yarn -> pnpm in contributing

* Apply suggestions from code review

Co-authored-by: Shu Ding <g@shud.in>
2022-06-01 10:59:24 -05:00
JJ Kasper
f7b81316ae
Update to leverage pnpm for monorepo (#37259)
* Update to leverage pnpm for monorepo

* update compiled

* update stats action

* update ci install step

* update ci

* add test dep

* update invoking scripts

* update caching

* skip cache for now

* update dep

* update packages and fix babel

* update compiled

* update lint

* update test

* update ci

* update pnpm store caching

* update path for windows

* update restore-key config

* update caching

* remove extra build azure stage

* re-add checkout

* update setting pnpm store

* bump

* remove azure caching as pnpm is faster to download

* update contributing

* apply suggestions

* remove install-peers

* prepublish -> prepublishOnly

* prepublish -> prepublishOnly more

* more yarn -> pnpm references

* more yarn -> pnpm references take 2

* use workspace protocol for root package.json

Co-authored-by: Steven <steven@ceriously.com>
2022-05-28 23:35:16 -05:00
Steven
57dcc9d329
Update pnpm create next-app for latest pnpm 6 and 7 (#37254)
This command changed in pnpm [6.32.13](https://github.com/pnpm/pnpm/releases/tag/v6.32.13) and [7.1.1](https://github.com/pnpm/pnpm/releases/tag/v7.1.1) so lets update it since its been a few weeks and we can expect pnpm users to update more regularly than npm users.

- Fixes https://github.com/vercel/next.js/pull/37240 
- Fixes https://github.com/vercel/next.js/pull/37045
- Fixes https://github.com/vercel/next.js/pull/37032
- Fixes https://github.com/vercel/next.js/pull/36602
- Fixes https://github.com/vercel/next.js/pull/36496
2022-05-27 21:21:40 +00:00
Tom
3e178bb801
add pnpm link to docs (#37221)
## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


Co-authored-by: Steven <steven@ceriously.com>
2022-05-27 15:46:38 -04:00
Balázs Orbán
3c764fc143
Update contributing doc and PR template for examples (#37215)
Follow-up on https://github.com/vercel/next.js/pull/37193

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-05-26 15:18:42 +00:00
JJ Kasper
7206614d0b
Update contributing doc and PR template for examples (#37193)
* Update contributing doc and PR template for examples

* Apply suggestions from code review

Co-authored-by: Steven <steven@ceriously.com>
2022-05-25 20:24:53 -05:00
Balázs Orbán
6aa9ef1955
enforce omitting name and version (#36771)
We have tests running on the examples repository that will fail if `name` or `version` is found in the `package.json`. We should make it more clear in the documentation to omit these fields.

@ijjk

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
2022-05-09 11:27:44 +00:00
Balázs Orbán
04e887b9d1
docs: clarify triaging (#36507) 2022-04-27 13:52:57 +02:00
Maia Teegarden
3b8e2f68d0
Make setup-wasm script work for local dev (#36355)
* Make setup-wasm script work for local dev

* Use copy instead of move
2022-04-21 15:41:48 -05:00
Gianmarco
807abde2ed
docs: suggest cloning with depth=1 to avoid huge downloads (#36064)
* docs: suggest cloning with depth=1 to avoid huge downloads

* Update contributing.md

Co-authored-by: JJ Kasper <jj@jjsweb.site>

* lint-fix

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-04-11 14:52:16 -05:00
JJ Kasper
f6de29f9d4
Add note to contributing about docs manifest (#36020)
* Add note to contributing about docs manifest

* Update contributing.md

Co-authored-by: Balázs Orbán <info@balazsorban.com>

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Balázs Orbán <info@balazsorban.com>
2022-04-11 12:12:40 +02:00
Steven
9f9214abe5
Updated create-next-app docs to include pnpm usage (#35755)
This PR updates the docs and examples for `create-next-app` to include pnpm usage.

The following script was used to update every example README:

```js
const fs = require('fs')
const examples = fs.readdirSync('./examples')

for (let example of examples) {
    const filename = `./examples/${example}/README.md`
    const markdown = fs.readFileSync(filename, 'utf8')
    const regex = new RegExp(`^yarn create next-app --example (.*)$`, 'gm')
    const output = markdown.replace(regex, (yarn, group) => {
        const pnpm = `pnpm create next-app -- --example ${group}`
        return `${yarn}\n# or\n${pnpm}`
    })
    fs.writeFileSync(filename, output)
}
```
2022-03-30 21:03:21 +00:00
Lee Robinson
04dae3e7de
Update contributing.md to link to walkthrough video. (#34299)
Hopefully this helps folks contribute 😄
2022-02-13 18:36:34 +00:00
Yasser A.Idrissi
fbb16fbb15
docs(contributing): Search GitHub for an open or closed PR that relates to your submission (#22533)
* docs(contributing): Search Github for an open or closed PR that relates to your submission

* move note up

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-02-06 13:36:11 -06:00
Huseyin ELMAS
4fc19792d0
fix(docs): master branch renaming (#33312)
contributing.md file still refers `master` branch name since the branch renamed as `main` recently. This PR contains a fix for that.

**related:**
#33153
#33198

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`


Co-authored-by: Tim Neutkens <6324199+timneutkens@users.noreply.github.com>
2022-01-14 13:55:30 +00:00
JJ Kasper
efabf81e23
Add util for generating new tests/error documents (#33001)
* Add util for generating new tests/error documents

* update compiled

* lint-fix

* apply suggestions

* update wording

* update compiled
2022-01-06 09:45:04 -06:00
Steven Tey
6ad8c338d8
Update contributing guidelines for examples (#32584)
* Update contributing.md

* Apply suggestions from code review

Co-authored-by: Lee Robinson <me@leerob.io>
2021-12-16 13:39:03 -06:00
Maia Teegarden
a79d4fc366
Extract next-swc Rust code into its own package (#31635)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-11-21 12:59:56 +01:00
matamatanot
ee3a51006f
Fix failed-loading-swc link in Troubleshooting (#31314)
## Documentation / Examples

#31265

- [x] Make sure the linting passes by running `yarn lint`
2021-11-11 17:53:01 +00:00
Jiachi Liu
82c09bd500
Update contributing doc with trouble shooting section for swc (#31265)
## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2021-11-10 20:18:33 +00:00
Maia Teegarden
b5a89160f7
Chore/rust workflow (#30577)
* Remove prebuilt binaries from repo

* Prefer locally built binary

* Add binary packages as optionalDependencies

* Remove build-native workflow for prebuilt binaries

* Remove binaries from checkCompiled job

* Change build-native command to default to dev

* Add build-native-dev and have tests depend on it

* Update contributing

* Run ls to make inspect artifact download

* Use correct artifact download path

* Try using reusable workflows

* Resort to duplication for now

* Inspect artifact download

* Ensure native is copied for PR stats

* Copy after ref checkout and log binaries for PR stats

* fix typo

* copy right before linking/packing

* Use fs.copy

* fix test for now

Co-authored-by: jj@jjsweb.site <jj@jjsweb.site>
2021-10-29 13:56:56 -05:00
Mitheel
d26e035b38
Fixed grammatical errors in CONTRIBUTING.md (#30542) 2021-10-28 11:15:36 -05:00
Katie Byers
58a79e34e5
add linting instructions (#30123) 2021-10-20 21:52:23 -05:00
JJ Kasper
a92a5caec2
Update test set-up to leverage playwright when able to (#28634)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-09-13 14:36:25 +02:00
C. Lewis
baeb98e847
docs: make contributing.md more contributor-friendly (#27913)
I originally sought out to add a statement about chromedriver before investing time in making the document as clear as possible for new contributors on the first read. Any notes are very welcome.

- add Ubuntu/Debian `apt install chromedriver` tip
- consistent heading names, subheadings
- formatting
- order changes:
    1. Developing
    2. Building
    3. Testing
    4. Adding warning/error descriptions
    5. Adding examples

## Documentation / Examples

- [x] Make sure the linting passes
2021-08-17 20:50:33 +00:00
C. Lewis
c9ff4c7989
feat(package.json): add contributor-friendly lifecycle scripts (#27825)
## Feature

I was struggling to get my local dev build working as a local package.json override, and types do not seem to be generated by `yarn dev`, so I had to figure out a cohesive way to build the project start-to-finish (and also clean the project).

Building the project and all types ended up just being `yarn prepublish`, here aliased as `yarn build`, and I added a `yarn clean` script. These two together should make it very difficult for any contributor to be confused how to generate a final build including all type declarations.

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [x] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

b2a888c144/contributing.md (building)
2021-08-09 16:21:16 +00:00
Maia Teegarden
4172a4c0a6
Add initial next swc package with first transform (#27355)
* Set up next-swc package with no custom transforms

* Add hook_optimizer transform

* Fix lint

* Build next-swc on CI

* Add toolchain in rust action

* Build binaries in manual workflow

* Commit from GitHub Actions (Build next-swc native binaries)

* Update dependencies

* Update swc and use stable rust

* Build next-swc binaries

* Test compiled code

* Dedupe @node-rs/helper

* Add workflow to check next-swc binaries

* Fix check native

* PR feedback

* PR feedback

* Pr feedback

* Build next-swc binaries

* Combine native workflows

* Add docs for contributors on less common platforms

* PR feedback

* Compare JsWord instead of converting to string

* Fix workflow formatting

* Add docs for building binaries for CI

* Build next-swc binaries

* Fix workflow if syntax

* Add license info to copied code

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-27 17:07:28 +02:00
JJ Kasper
6eaa6853ce
Mention running local changes inside monorepo (#27050) 2021-07-09 11:39:00 -05:00
Tim Neutkens
59c742ee7f
Add instructions on how to add nextjs.org/docs/messages urls (#26865)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-02 13:39:00 +02:00
Steven
acd0fabf83
Update publish-canary script to include checkout (#26840)
* Update `publish-canary` script to include checkout

* Update contrib with publishing section
2021-07-01 17:19:14 -05:00
Peter Mekhaeil
005a6e4c85
chore: Add Alex to lint documentation (#26354)
This Pull Request adds [Alex](https://alexjs.com/) to our documentation. It catches insensitive, inconsiderate writing. 

The original PR (https://github.com/vercel/next.js/pull/25821) is too large so I have decided to break it down into smaller PRs. This PR is the first part. Then I will continue to add the rest of the documentation in smaller PRs.

## More Information on Alex:
https://alexjs.com/
https://github.com/get-alex/alex

## Documentation / Examples

- [x] Make sure the linting passes
2021-06-22 16:03:12 +00:00
John Jago
c6ba29da00
docs: use descriptive links instead of "click here" (#25897)
* docs: use descriptive links instead of "click here"

Linking text such as "here" or "click here" is not accessible (and
doesn't look that great either). The best example of why it's better to
use link text that provides context is that some screen readers allow
navigation by links alone. If all links say "click here", then how does
the user know which one to go to?

I tried to make the minimal change necessary to make the link text
descriptive but had to reword a few sentences that didn't read well.

* Apply suggestions from code review

Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-06-09 13:23:16 -05:00
Dominic Elm
d2caaeab64
docs: add 'Open in StackBlitz' buttons to various examples (#25853)
This PR adds a `Preview` section and a `Open in StackBlitz` button to various examples. I have tested all examples and omitted the ones that require third party API keys, or didn't work. Some examples don't work locally either.

Here's an example:
![image](https://user-images.githubusercontent.com/12571019/121027783-88971280-c7a7-11eb-851a-0ad30cf74b42.png)

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [x] Examples updated
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [x] Make sure the linting passes
2021-06-08 20:45:02 +00:00
Johan Eliasson
f384cd103b
Consistent use of colons in contributing docs (#23260)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-03-22 15:46:07 +01:00
Luis Alvarez D
0370c037fc
Update links that go to vercel.com/now (#21556) 2021-01-26 18:59:01 +00:00
Sumanth Ratna
f40a41cd6d
Update chromedriver brew install instructions in contributing doc (#21251)
`brew cask install` was recently deprecated in favor of `brew install --cask`
2021-01-17 18:55:44 +00:00
Luc Leray
8eaabe2fb0
Fix deploy buttons URLs (#20834)
Fix all deploy button URLs in the Next.js repo to follow the following format:
```
https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/<EXAMPLE_NAME>&project-name=<EXAMPLE_NAME>&repository-name=<EXAMPLE_NAME>
```

The detailed docs for the Deploy Button can be found here: https://vercel.com/docs/more/deploy-button.

Also updates legacy Vercel import flow URLs (starting with vercel.com/import or with vercel.com/new/project), to use the new vercel.com/new URLs.

---

For example, for the `hello-world` example:

The URL is https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/hello-world&project-name=hello-world&repository-name=hello-world

And the deploy button looks like this:
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/hello-world&project-name=hello-world&repository-name=hello-world)

---

For reference, I used the following regexes to search for the incorrect URLs

```
\(https://vercel.com/import/git\?s=https://github.com/vercel/next.js/tree/canary/examples/(.*)\)
\(https://vercel.com/import/git\?c=1&s=https://github.com/vercel/next.js/tree/canary/examples/([^&]*)(.*)\)
\(https://vercel.com/import/project\?template=https://github.com/vercel/next.js/tree/canary/examples/(.*)\)
https://vercel.com/import/git
https://vercel.com/import/select-scope
https://vercel.com/import
https://vercel.com/new/project
```
2021-01-07 01:40:29 +00:00
NorbertLuszkiewicz
c03d4931de
Simplify example usage instructions (#16678)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-08-29 22:22:02 -04:00
Joe Haddad
7d038dfef1
Suggest npx over npm init (#13637)
This updates old examples to the more universal `npx` command.

Fixes https://github.com/vercel/next.js/discussions/12103
2020-06-01 17:36:57 +00:00
Joe Haddad
b7e17e09e5
Update references to zeit/next.js (#13463) 2020-05-27 17:51:11 -04:00
JJ Kasper
1f6ce106ae
Update codeload and deploy links for org rename (#13141)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-05-27 14:11:39 -04:00
Ty Mick
f6374e6649
Fix "Commitment to Open Source" link in contributing.md (#13352)
https://vercel.com/blog/oss redirects to https://vercel.com. Is https://vercel.com/oss the right URL?
2020-05-25 15:35:44 +00:00
liulanz
c3d0b0822f
Updated example template in contributing.md (#11968) 2020-05-02 00:47:48 -04:00
Tim Neutkens
483bd3ddda
Rename ZEIT to Vercel (#12075)
* Find/replace

* Update more URLs

* More rename

* Fix remaining examples

* More updates

* Update create-next-app

* Update remaining text

* Update

Co-authored-by: Shu Uesugi <shu@chibicode.com>
2020-04-21 11:47:12 +02:00
Luis Alvarez D
84b73bdb0a
[contributing docs] Add more details about chromedriver for ma… (#11739) 2020-04-08 09:58:16 +02:00
Shu Uesugi
c57cdbb31d
Rename zeit.co/new → zeit.co/import (#10674)
* Replace zeit.co/new → zeit.co/import

* Update deployment.md
2020-02-24 19:08:34 -05:00
Shu Uesugi
5f041447bc
Remove Now CLI reference from examples (#10501)
* Find/Replace "Deploy it to the cloud..."

* Find/Replace "Deploy it to the cloud..." (no colon)

* Find/Replace "Deploy it to the cloud..." for firebase

* Convert remaining ones

* Storybook deployment

* Update with-stripe-typescript

* Update contributing.md

* Remove `now`

* Update examples/with-stripe-typescript/README.md

Co-Authored-By: Luis Alvarez D. <luis@zeit.co>
2020-02-12 17:14:57 -05:00
Shu Uesugi
6804039e94 Make example READMEs more consistent (#10124)
* npx create → npm init

* Fix inconsistent instructions

* Update amp-first

* Update with-graphql-react

* with-firebase-cloud-messaging

* Update with-higher-order-component

* change create-next-app url

* Update create-next-app instruction

* Update instructions to use npm instead of npx

* Move "the idea behind the example" to top

* Rename

* Rename

* Update contributing.md with a README template
2020-01-16 23:23:56 +01:00
Tim Neutkens
1546fcdcfd
Update contributing.md 2020-01-03 16:14:53 +01:00
JJ Kasper
20fb2be605
Update testing notes in contributing doc (#9878) 2019-12-30 10:15:34 -06:00