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

Readme: Clarify usage of our build system #3239

Merged
merged 2 commits into from Dec 2, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -16,7 +16,7 @@ You can learn more on [prismjs.com](https://prismjs.com/).
Prism depends on community contributions to expand and cover a wider array of use cases. If you like it, consider giving back by sending a pull request. Here are a few tips:

- 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.
- 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 generated by our build system (see below).
- 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.
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Expand Up @@ -62,7 +62,7 @@ <h2>Contribute to Prism!</h2>
<p>Prism depends on community contributions to expand and cover a wider array of use cases. If you like it, consider giving back by sending a pull request. Here are a few tips:</p>
<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>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 generated by our build system (see below).</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>
Expand Down