Skip to content

Commit

Permalink
feat: move to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
dougalg committed Dec 23, 2023
1 parent 34100df commit badc851
Show file tree
Hide file tree
Showing 7 changed files with 10,688 additions and 9,811 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ jobs:
- name: Use Node.js LTS
uses: actions/setup-node@v4
with:
# alias support: https://github.com/actions/setup-node/issues/26
node-version: '12'
node-version: '20'
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
Expand All @@ -25,12 +24,11 @@ jobs:
restore-keys: |
${{ runner.OS }}-npm-cache-${{ matrix.os }}
- name: Install Dependencies
run: |
npm install -g yarn
yarn --frozen-lockfile --non-interactive
run:
pnpm --frozen-lockfile --non-interactive
- name: Test
run: yarn test
run: pnpm test
- name: Lint
run: yarn lint
run: pnpm lint
env:
CI: true
22 changes: 10 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,22 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js LTS
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
# alias support: https://github.com/actions/setup-node/issues/26
node-version: '14'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
node-version: '20'
- uses: pnpm/action-setup@v2
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: yarn
run: pnpm install --frozen-lockfile --non-interactive
- name: Semantic Release
run: npx semantic-release@15.13.30
run: npx semantic-release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Seamless integration between [Rollup](https://github.com/rollup/rollup) and [Pos
## Install

```bash
yarn add postcss rollup-plugin-postcss --dev
pnpm add postcss rollup-plugin-postcss --dev
```

## Usage
Expand Down Expand Up @@ -90,9 +90,9 @@ postcss({

Install corresponding dependency:

- For `Sass` install `node-sass`: `yarn add node-sass --dev`
- For `Stylus` Install `stylus`: `yarn add stylus --dev`
- For `Less` Install `less`: `yarn add less --dev`
- For `Sass` install `node-sass`: `pnpm add node-sass --dev`
- For `Stylus` Install `stylus`: `pnpm add stylus --dev`
- For `Less` Install `less`: `pnpm add less --dev`

That's it, you can now import `.styl` `.scss` `.sass` `.less` files in your library.

Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
"version": "4.0.0",
"description": "Seamless integration between Rollup and PostCSS",
"main": "dist/index.js",
"packageManager": "[email protected]",
"files": [
"dist",
"types/index.d.ts"
],
"scripts": {
"test": "npm run lint && jest",
"test:cov": "npm run lint && jest --coverage",
"test": "pnpm run lint && jest",
"test:cov": "pnpm run lint && jest --coverage",
"build": "bili",
"lint": "xo",
"prepublishOnly": "npm run build"
"prepublishOnly": "pnpm run build"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -44,7 +45,7 @@
"fs-extra": "^9.0.1",
"jest": "^26.6.3",
"less": "^3.12.2",
"node-sass": "^5.0.0",
"node-sass": "^9.0.0",
"postcss": "^8.2.7",
"rollup": "^2.34.2",
"stylus": "^0.54.8",
Expand Down
Loading

0 comments on commit badc851

Please sign in to comment.