docs: remove yarn references

pull/2005/head
Evan You 2 years ago
parent c2de4caa34
commit 78836522b8

@ -28,13 +28,13 @@ If your site is to be served at a subdirectory (`https://example.com/subdir/`),
- You may run this command to build the docs: - You may run this command to build the docs:
```sh ```sh
$ yarn docs:build $ npm run docs:build
``` ```
- Once you've built the docs, you can test them locally by running: - Once you've built the docs, you can test them locally by running:
```sh ```sh
$ yarn docs:preview $ npm run docs:preview
``` ```
The `preview` command will boot up a local static web server that will serve the files from `.vitepress/dist` at `http://localhost:4173`. It's an easy way to check if the production build looks fine in your local environment. The `preview` command will boot up a local static web server that will serve the files from `.vitepress/dist` at `http://localhost:4173`. It's an easy way to check if the production build looks fine in your local environment.
@ -55,7 +55,7 @@ If your site is to be served at a subdirectory (`https://example.com/subdir/`),
Set up a new project and change these settings using your dashboard: Set up a new project and change these settings using your dashboard:
- **Build Command:** `yarn docs:build` - **Build Command:** `npm run docs:build`
- **Output Directory:** `docs/.vitepress/dist` - **Output Directory:** `docs/.vitepress/dist`
- **Node Version:** `14` (or above, by default it usually will be 14 or 16, but on Cloudflare Pages the default is still 12, so you may need to [change that](https://developers.cloudflare.com/pages/platform/build-configuration/)) - **Node Version:** `14` (or above, by default it usually will be 14 or 16, but on Cloudflare Pages the default is still 12, so you may need to [change that](https://developers.cloudflare.com/pages/platform/build-configuration/))
@ -94,10 +94,10 @@ Don't enable options like _Auto Minify_ for HTML code. It will remove comments f
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: 16 node-version: 16
cache: yarn cache: npm
- run: yarn install --frozen-lockfile - run: npm install --frozen-lockfile
- name: Build - name: Build
run: yarn docs:build run: npm run docs:build
- uses: actions/configure-pages@v2 - uses: actions/configure-pages@v2
- uses: actions/upload-pages-artifact@v1 - uses: actions/upload-pages-artifact@v1
with: with:
@ -136,8 +136,8 @@ Don't enable options like _Auto Minify_ for HTML code. It will remove comments f
paths: paths:
- node_modules/ - node_modules/
script: script:
- yarn install - npm install
- yarn docs:build - npm run docs:build
artifacts: artifacts:
paths: paths:
- public - public
@ -155,8 +155,8 @@ Don't enable options like _Auto Minify_ for HTML code. It will remove comments f
before_script: before_script:
- apk add git - apk add git
script: script:
- yarn install - npm install
- yarn docs:build - npm run docs:build
artifacts: artifacts:
paths: paths:
- public - public
@ -172,7 +172,7 @@ Don't enable options like _Auto Minify_ for HTML code. It will remove comments f
- **`app_location`**: `/` - **`app_location`**: `/`
- **`output_location`**: `docs/.vitepress/dist` - **`output_location`**: `docs/.vitepress/dist`
- **`app_build_command`**: `yarn docs:build` - **`app_build_command`**: `npm run docs:build`
## Firebase ## Firebase
@ -199,7 +199,7 @@ Don't enable options like _Auto Minify_ for HTML code. It will remove comments f
} }
``` ```
2. After running `yarn docs:build`, run this command to deploy: 2. After running `npm run docs:build`, run this command to deploy:
```sh ```sh
firebase deploy firebase deploy
@ -207,7 +207,7 @@ Don't enable options like _Auto Minify_ for HTML code. It will remove comments f
## Surge ## Surge
1. After running `yarn docs:build`, run this command to deploy: 1. After running `npm run docs:build`, run this command to deploy:
```sh ```sh
npx surge docs/.vitepress/dist npx surge docs/.vitepress/dist

@ -215,7 +215,7 @@ Wraps in a <div class="vp-raw">
- Install required deps with your preferred package manager: - Install required deps with your preferred package manager:
```sh ```sh
$ yarn add -D postcss postcss-prefix-selector $ npm install -D postcss postcss-prefix-selector
``` ```
- Create a file named `docs/.postcssrc.cjs` and add this to it: - Create a file named `docs/.postcssrc.cjs` and add this to it:

Loading…
Cancel
Save