mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-08 04:28:41 +00:00
Replace yarn run
and yarn install
with yarn
, remove building with npm
instructions (#1528)
* Replace `yarn run` with `yarn` * Replace `yarn install` with `yarn` * Remove building using `npm` from node.md
This commit is contained in:
@@ -36,7 +36,7 @@ Based on this information and what you want to support with your website, you mi
|
||||
For example, if you wanted to create a trimmed down version of KaTeX, you could only include the `woff` files and gain the most support with the least number of files. To do this:
|
||||
|
||||
1. Set `@use-ttf`, and `@use-woff2` to `false` at the top of [fonts.less](https://github.com/KaTeX/katex-fonts/blob/master/fonts.less).
|
||||
2. Rebuild KaTeX by running `yarn run build` from the top-level directory.
|
||||
2. Rebuild KaTeX by running `yarn build` from the top-level directory.
|
||||
3. Include only the `build/fonts/*.woff` files in your distribution.
|
||||
|
||||
## Location of font files
|
||||
@@ -44,5 +44,5 @@ For example, if you wanted to create a trimmed down version of KaTeX, you could
|
||||
The default build of KaTeX expects the KaTeX fonts to be located in a directory called `fonts` which is a sibling of the `katex.min.css` stylesheet. This can be changed as follows:
|
||||
|
||||
1. At the top of the [fonts.less](https://github.com/KaTeX/katex-fonts/blob/master/fonts.less) file, set `@font-folder` to the location of your fonts. You can use relative or absolute paths, so setting it to `"/fonts"` would cause it to search for the fonts in a root `fonts` folder, while `"../fonts"` would search in a `fonts` directory one level above the `katex.min.css` file.
|
||||
2. Rebuild KaTeX by running `yarn run build` from the top-level directory.
|
||||
2. Rebuild KaTeX by running `yarn build` from the top-level directory.
|
||||
3. Use the newly generated `build/katex.min.css` file, and place the fonts where you indicated.
|
||||
|
@@ -22,7 +22,7 @@ yarn global add katex
|
||||
|
||||
## Building from Source
|
||||
|
||||
To build you will need Git, Node.js 6.9 or later, and npm or Yarn.
|
||||
To build you will need Git, Node.js 6.9 or later, and Yarn.
|
||||
|
||||
Clone a copy of the GitHub source repository:
|
||||
```bash
|
||||
@@ -32,8 +32,8 @@ cd KaTeX
|
||||
|
||||
Then install dependencies and run `build` script:
|
||||
```bash
|
||||
npm install # or yarn install
|
||||
npm run build # or yarn build
|
||||
yarn
|
||||
yarn build
|
||||
```
|
||||
|
||||
> You can manually download the package and source code from
|
||||
|
Reference in New Issue
Block a user