Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,21 @@ Start by ensuring that you have Node.js installed and forking the repository:
- Fork the **webpack.js.org** repo from [the main repository][2].
- `git clone <your-clone-url> && cd webpack.js.org`

> To run the project, you must run scripts that download the website content from GitHub.
> To avoid hitting rate limits, you'll need to use your GitHub token.
> The build scripts (`fetch-repo` and `fetch:*` commands) use this token to retrieve repository data,
> including documentation, examples, and contributors.
> If you do not have one, you can create it on the [GitHub Personal Access Tokens page](https://github.com/settings/personal-access-tokens).

Once you are in the project directory, run the following commands:

- `yarn` to pull all dependencies.
- `GITHUB_TOKEN=<your-token-here> yarn fetch-all` - Fetches all updated website content from GitHub.
- `yarn build` to create a production version of the site.
- `yarn start` to develop on a local webpack-dev-server: [localhost:3000][3].

**Note:** The `fetch` and `fetch-repos` commands must be run before building the site as they populate necessary data for the build process.

> NOTE: run `yarn fetch-repos` and then `yarn fetch` before running `yarn start` command for the first time

- `yarn fetch` to retrieve external documentation/data.
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"fetch": "run-p fetch:*",
"fetch:readmes": "node src/utilities/fetch-package-readmes.mjs",
"fetch:supporters": "node src/utilities/fetch-supporters.mjs",
"fetch-all": "run-s fetch-repos fetch",
"prebuild": "npm run clean",
"build": "run-s fetch-repos fetch content && webpack --config webpack.prod.mjs --config-node-env production && run-s printable content && webpack --config webpack.ssg.mjs --config-node-env production --env ssg",
"postbuild": "npm run sitemap",
Expand Down
Loading