Skip to content

Commit

Permalink
chore(ci): improve release (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kit-p authored Mar 18, 2023
1 parent d477871 commit 39a737f
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 8 deletions.
13 changes: 13 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,20 @@
}
}
],
[
"@semantic-release/changelog",
{
"changelogFile": "docs/CHANGELOG.md"
}
],
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": ["docs", "package.json"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
[
"@semantic-release/github",
{
Expand Down
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"pnpm": "^7.14.2"
},
"type": "module",
"main": "dist/index.umd.min.js",
"main": "dist/index.umd.min.cjs",
"types": "dist/index.d.ts",
"module": "dist/index.esm.min.js",
"module": "dist/index.esm.min.mjs",
"keywords": [
"json",
"utility",
Expand All @@ -19,8 +19,8 @@
],
"exports": {
".": {
"require": "./dist/index.umd.min.js",
"import": "./dist/index.esm.min.js"
"require": "./dist/index.umd.min.cjs",
"import": "./dist/index.esm.min.mjs"
}
},
"scripts": {
Expand All @@ -34,8 +34,8 @@
"build:types": "tsc -d --emitDeclarationOnly",
"build:js": "rollup -c rollup.config.mjs && pnpm run minify",
"minify": "concurrently \"pnpm:minify:*\"",
"minify:umd": "terser dist/index.umd.js --compress --mangle > dist/index.umd.min.js",
"minify:esm": "terser dist/index.esm.js --compress --mangle > dist/index.esm.min.js",
"minify:umd": "terser dist/index.umd.cjs --compress --mangle > dist/index.umd.min.cjs",
"minify:esm": "terser dist/index.esm.mjs --compress --mangle > dist/index.esm.min.mjs",
"pre-release": "pnpm run lint && pnpm run test && pnpm run build",
"semantic-release": "semantic-release"
},
Expand Down Expand Up @@ -72,6 +72,8 @@
"@rollup/plugin-commonjs": "^24.0.1",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-typescript": "^11.0.0",
"@semantic-release/changelog": "^6.0.2",
"@semantic-release/git": "^10.0.1",
"@semantic-release/npm": "^9.0.2",
"@swc/core": "^1.3.35",
"@swc/jest": "^0.2.24",
Expand Down
42 changes: 42 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ const config = {
input: "src/index.ts",
output: [
{
file: "dist/index.esm.js",
file: "dist/index.esm.mjs",
format: "es",
},
{
file: "dist/index.umd.js",
file: "dist/index.umd.cjs",
format: "umd",
name: "JsonKit",
},
Expand Down

0 comments on commit 39a737f

Please sign in to comment.