Skip to content

Commit

Permalink
Readme: Mention npm ci (#2899)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed May 24, 2021
1 parent b77317c commit 91f3aae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Prism depends on community contributions to expand and cover a wider array of us

- Read the [documentation](https://prismjs.com/extending.html). Prism was designed to be extensible.
- Do not edit `prism.js`, it’s just the version of Prism used by the Prism website and is built automatically. Limit your changes to the unminified files in the `components/` folder. `prism.js` and all minified files are also generated automatically by our build system.
- Use `npm ci` to install Prism's dependencies. Do not use `npm install` because it will cause non-deterministic builds.
- The build system uses [gulp](https://github.com/gulpjs/gulp) to minify the files and build `prism.js`. With all of Prism's dependencies installed, you just need to run the command `npm run build`.
- Please follow the code conventions used in the files already. For example, I use [tabs for indentation and spaces for alignment](http://lea.verou.me/2012/01/why-tabs-are-clearly-superior/). Opening braces are on the same line, closing braces on their own line regardless of construct. There is a space before the opening brace. etc etc.
- Please try to err towards more smaller PRs rather than a few huge PRs. If a PR includes changes that I want to merge and also changes that I don't, handling it becomes difficult.
Expand Down
1 change: 1 addition & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ <h2>Contribute to Prism!</h2>
<ul>
<li>Read the <a href="https://prismjs.com/extending.html">documentation</a>. Prism was designed to be extensible.</li>
<li>Do not edit <code>prism.js</code>, it’s just the version of Prism used by the Prism website and is built automatically. Limit your changes to the unminified files in the <code>components/</code> folder. <code>prism.js</code> and all minified files are also generated automatically by our build system.</li>
<li>Use <code>npm ci</code> to install Prism's dependencies. Do not use <code>npm install</code> because it will cause non-deterministic builds.</li>
<li>The build system uses <a href="https://github.com/gulpjs/gulp">gulp</a> to minify the files and build <code>prism.js</code>. With all of Prism's dependencies installed, you just need to run the command <code>npm run build</code>.</li>
<li>Please follow the code conventions used in the files already. For example, I use <a href="http://lea.verou.me/2012/01/why-tabs-are-clearly-superior/">tabs for indentation and spaces for alignment</a>. Opening braces are on the same line, closing braces on their own line regardless of construct. There is a space before the opening brace. etc etc.</li>
<li>Please try to err towards more smaller PRs rather than a few huge PRs. If a PR includes changes that I want to merge and also changes that I don't, handling it becomes difficult.</li>
Expand Down

0 comments on commit 91f3aae

Please sign in to comment.