Skip to content

Commit

Permalink
build: use pkgroll (privatenumber#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber authored Apr 26, 2022
1 parent 3088182 commit 1fb15f6
Show file tree
Hide file tree
Showing 9 changed files with 310 additions and 276 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ jobs:
node-version: 14.x
- name: Install dependencies
run: npx ci
- name: Test
run: npm run test --if-present
- name: Build
run: npm run build --if-present
- name: Test (pretest produces build)
run: npm run test
- name: Release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npx ci
- name: Build
run: npm run build
- name: Test
run: npm run test
- name: Lint
if: ${{ matrix.node-version == '14.x' }}
run: npm run lint
- name: Test
run: npm run test
- name: Test DTS
run: npm run test:dts
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,14 @@
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
}
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
},
"scripts": {
"build": "tsup src/index.ts --dts --format esm,cjs --minify",
"build": "pkgroll --minify",
"lint": "eslint .",
"pretest": "npm run build",
"test": "CI=true jest",
"test:dts": "tsd"
},
Expand Down Expand Up @@ -62,8 +61,8 @@
"husky": "^4.3.8",
"jest": "^27.4.7",
"lint-staged": "^12.1.2",
"pkgroll": "^1.0.5",
"tsd": "^0.19.1",
"tsup": "^5.11.10",
"typescript": "^4.5.4"
},
"eslintConfig": {
Expand Down
Loading

0 comments on commit 1fb15f6

Please sign in to comment.