Skip to content

Commit

Permalink
chore: use pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
Airkro committed Apr 16, 2024
1 parent f19087b commit c288d2f
Show file tree
Hide file tree
Showing 13 changed files with 4,261 additions and 10,422 deletions.
4 changes: 2 additions & 2 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh

npm run lint:staged
npm test
pnpm run lint:staged
pnpm test
45 changes: 16 additions & 29 deletions .github/workflows/bring-it.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,31 @@ on:
jobs:
test:
strategy:
max-parallel: 1
matrix:
os:
- macos-latest
- windows-latest
- ubuntu-latest
node:
- 18.0.0
- 16.13.0
include:
- current
- lts/*
- lts/-1
exclude:
- os: ubuntu-latest
node: 16.13.0
publish: true
node: lts/*

runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Setup node
uses: actions/setup-node@v3
- name: Run
uses: airkro/bring-it@actions
with:
node-version: ${{ matrix.node }}
registry-url: https://registry.npmjs.org
cache: npm

- name: Prepare
run: npm install npm -g

- name: Install
run: npm ci

- name: Test
run: npm test

- name: Publish
if: ${{ matrix.publish }}
run: npm exec bring-it npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
publish:
needs: [test]
runs-on: ubuntu-latest
steps:
- name: Run
uses: airkro/bring-it@actions
with:
npm-token: ${{ secrets.NPM_TOKEN }}
45 changes: 39 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Created by https://gitignore.io/api/node,windows
# Edit at https://gitignore.io?templates=node,windows
# Created by https://gitignore.io/api/ssh,certificates,node,windows
# Edit at https://gitignore.io?templates=ssh,certificates,node,windows

### certificates ###
*.pem
*.key
*.crt
*.cer
*.der
*.priv

### Node ###
# Logs
Expand Down Expand Up @@ -58,6 +66,9 @@ web_modules/
# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
Expand All @@ -73,10 +84,12 @@ web_modules/
# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
# dotenv environment variable files
.env
.env.test
.env.production
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
Expand All @@ -99,6 +112,12 @@ dist
# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

Expand All @@ -121,6 +140,20 @@ dist
.yarn/install-state.gz
.pnp.*

### Node Patch ###
# Serverless Webpack directories
.webpack/

# Optional stylelint cache

# SvelteKit build / generate output
.svelte-kit

### SSH ###
**/.ssh/id_*
**/.ssh/*_id_*
**/.ssh/known_hosts

### Windows ###
# Windows thumbnail cache files
Thumbs.db
Expand All @@ -147,4 +180,4 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk

# End of https://gitignore.io/api/node,windows
# End of https://gitignore.io/api/ssh,certificates,node,windows
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enable-pre-post-scripts = true
Loading

0 comments on commit c288d2f

Please sign in to comment.