mirror of
https://github.com/tachiyomiorg/website.git
synced 2024-10-31 23:15:05 +01:00
Replace NPM with PNPM
Faster, easier
This commit is contained in:
parent
73a0604bef
commit
7d67ff8b73
4
.github/workflows/deploy.yml
vendored
4
.github/workflows/deploy.yml
vendored
@ -36,11 +36,11 @@ jobs:
|
|||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
cache: npm
|
cache: pnpm
|
||||||
cache-dependency-path: "**/package-lock.json"
|
cache-dependency-path: "**/package-lock.json"
|
||||||
|
|
||||||
- name: Install and build
|
- name: Install and build
|
||||||
run: npm ci && npm run build
|
run: pnpm install && pnpm build
|
||||||
|
|
||||||
- name: Configure pages
|
- name: Configure pages
|
||||||
uses: actions/configure-pages@v2
|
uses: actions/configure-pages@v2
|
||||||
|
@ -8,33 +8,33 @@ Before submitting your contribution, please make sure to take a moment and read
|
|||||||
|
|
||||||
## Development Setup
|
## Development Setup
|
||||||
|
|
||||||
You will need [Node.js](http://nodejs.org) **version 18+**, and [npm](https://docs.npmjs.com/try-the-latest-stable-version-of-npm) **version 9+**.
|
You will need [Node.js](http://nodejs.org) **version 18+**, and [pnpm](https://pnpm.io/installation) **version 8+**.
|
||||||
|
|
||||||
After cloning the repo and entering the the directory, go to the `/website` folder and run:
|
After cloning the repo and entering the the directory, go to the `/website` folder and run:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
# Installs any dependencies needed.
|
# Installs any dependencies needed.
|
||||||
$ npm install
|
$ pnpm install
|
||||||
```
|
```
|
||||||
|
|
||||||
To run the project now, run:
|
To run the project now, run:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
# This command start a local server you can access and edit live.
|
# This command start a local server you can access and edit live.
|
||||||
$ npm run dev
|
$ pnpm dev
|
||||||
```
|
```
|
||||||
|
|
||||||
### Commonly used NPM scripts
|
### Commonly used PNPM scripts
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
# This command will generate a static site inside a dist directory in your project.
|
# This command will generate a static site inside a dist directory in your project.
|
||||||
$ npm run build
|
$ pnpm build
|
||||||
|
|
||||||
# Run this command to preview the built files in a local server.
|
# Run this command to preview the built files in a local server.
|
||||||
$ npm run preview
|
$ pnpm preview
|
||||||
```
|
```
|
||||||
|
|
||||||
**Please make sure to have `npm run test` pass successfully before submitting a PR.** Although the same tests will be run against your PR on the CI server, it is better to have it working locally.
|
**Please make sure to have `pnpm test` pass successfully before submitting a PR.** Although the same tests will be run against your PR on the CI server, it is better to have it working locally.
|
||||||
|
|
||||||
It is also recommended you lint your files before the PR.
|
It is also recommended you lint your files before the PR.
|
||||||
|
|
||||||
|
@ -4,4 +4,4 @@
|
|||||||
[build]
|
[build]
|
||||||
base = "website"
|
base = "website"
|
||||||
publish = "src/.vitepress/dist"
|
publish = "src/.vitepress/dist"
|
||||||
command = "npm run build"
|
command = "pnpm build"
|
||||||
|
7037
website/package-lock.json
generated
7037
website/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -13,12 +13,13 @@
|
|||||||
"url": "https://github.com/tachiyomiorg/website/issues"
|
"url": "https://github.com/tachiyomiorg/website/issues"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "npm run lint && npm run build && npm run preview",
|
"preinstall": "npx only-allow pnpm",
|
||||||
|
"test": "pnpm lint && pnpm build && pnpm preview",
|
||||||
"dev": "vitepress dev src",
|
"dev": "vitepress dev src",
|
||||||
"build": "vitepress build src",
|
"build": "vitepress build src",
|
||||||
"preview": "vitepress preview src",
|
"preview": "vitepress preview src",
|
||||||
"lint": "npm run lint:es && npm run lint:prettier && npm run lint:mdl && npm run lint:style",
|
"lint": "pnpm lint:es && pnpm lint:prettier && pnpm lint:mdl && pnpm lint:style",
|
||||||
"lint:fix": "npm run lint:es:fix && npm run lint:prettier:fix && npm run lint:style:fix",
|
"lint:fix": "pnpm lint:es:fix && pnpm lint:prettier:fix && pnpm lint:style:fix",
|
||||||
"lint:es": "eslint . --ext .vue,.js,.ts,.cjs,.mjs,.jsx,.tsx",
|
"lint:es": "eslint . --ext .vue,.js,.ts,.cjs,.mjs,.jsx,.tsx",
|
||||||
"lint:es:fix": "eslint . --ext .vue,.js,.ts,.cjs,.mjs,.jsx,.tsx --fix",
|
"lint:es:fix": "eslint . --ext .vue,.js,.ts,.cjs,.mjs,.jsx,.tsx --fix",
|
||||||
"lint:prettier": "prettier --check \"src/**/*\"",
|
"lint:prettier": "prettier --check \"src/**/*\"",
|
||||||
@ -56,7 +57,7 @@
|
|||||||
"vue-eslint-parser": "^9.3.1"
|
"vue-eslint-parser": "^9.3.1"
|
||||||
},
|
},
|
||||||
"simple-git-hooks": {
|
"simple-git-hooks": {
|
||||||
"pre-commit": "npm run lint-staged"
|
"pre-commit": "pnpm lint-staged"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{styl,vue}": "stylelint --fix",
|
"*.{styl,vue}": "stylelint --fix",
|
||||||
|
4140
website/pnpm-lock.yaml
Normal file
4140
website/pnpm-lock.yaml
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user