Skip to content

Commit

Permalink
feat(build): ✨ use pkgroll for simpler bundling and less deps
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmy-guzman committed Aug 24, 2023
1 parent 5834336 commit f331fdb
Show file tree
Hide file tree
Showing 7 changed files with 496 additions and 634 deletions.
34 changes: 0 additions & 34 deletions .config/rollup.config.js

This file was deleted.

3 changes: 0 additions & 3 deletions bin/run

This file was deleted.

3 changes: 0 additions & 3 deletions bin/run.cmd

This file was deleted.

1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"lilconfig",
"nvmrc",
"outfile",
"pkgroll",
"pnpm",
"postbuild",
"postpublish",
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { execSync } from 'child_process'
const setupGitzy = async (args: string): Promise<unknown> => {
return new Promise((resolve, reject) => {
try {
const result = execSync(`node ./bin/run --dry-run ${args}`)
const result = execSync(`node ./dist/index.js --dry-run ${args}`)
.toString('utf8')
.split('\n')

Expand Down
24 changes: 5 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"description": "interactive conventional commits cli",
"version": "3.4.0",
"author": "jimmy-guzman @jimmy-guzman",
"main": "dist/index.js",
"repository": "jimmy-guzman/gitzy",
"bugs": "https://github.com/jimmy-guzman/gitzy/issues",
"homepage": "https://github.com/jimmy-guzman/gitzy",
Expand All @@ -16,11 +15,9 @@
"publishConfig": {
"access": "public"
},
"bin": {
"gitzy": "./bin/run"
},
"bin": "./dist/index.js",
"scripts": {
"dev": "run-p build:watch ts-check:watch",
"build": "pkgroll --minify --target=node14",
"format": "prettier '**/**/*.{md,yml,json,ts}'",
"format:check": "pnpm format -c",
"format:fix": "pnpm format -w",
Expand All @@ -32,10 +29,7 @@
"ts-check": "tsc -b tsconfig.json",
"ts-check:watch": "pnpm ts-check --watch",
"validate": "run-p lint format:check test ts-check",
"build": "rm -rf dist/ && rollup -c .config/rollup.config.js --validate",
"build:watch": "pnpm build --watch --exclude dist/ --environment DEV",
"build:debug": "pnpm build --environment DEBUG_MODE",
"cz": "pnpm build && ./bin/run --commitlint",
"cz": "pnpm build && ./dist/index.js --commitlint",
"prepare": "is-ci || husky install"
},
"prettier": "@comparto/prettier-config",
Expand All @@ -57,15 +51,11 @@
"devDependencies": {
"@comparto/prettier-config": "1.2.0",
"@jest/types": "28.1.3",
"@rollup/plugin-commonjs": "22.0.2",
"@rollup/plugin-eslint": "8.0.2",
"@rollup/plugin-node-resolve": "13.3.0",
"@semantic-release/changelog": "6.0.3",
"@semantic-release/git": "10.0.1",
"@types/jest": "28.1.8",
"@types/node": "18.15.11",
"commitlint": "17.1.2",
"esbuild": "0.15.5",
"eslint": "8.23.0",
"eslint-config-jimmy-guzman": "7.0.0",
"eslint-import-resolver-typescript": "3.5.0",
Expand All @@ -75,18 +65,14 @@
"jest": "28.1.3",
"lint-staged": "13.0.3",
"npm-run-all": "4.1.5",
"pkgroll": "1.11.0",
"prettier": "2.7.1",
"rollup": "2.78.1",
"rollup-plugin-esbuild": "4.10.1",
"rollup-plugin-node-externals": "4.1.1",
"rollup-plugin-visualizer": "5.8.0",
"semantic-release": "19.0.5",
"ts-jest": "28.0.8",
"typescript": "4.9.5"
},
"files": [
"/bin",
"/dist"
"dist"
],
"engines": {
"node": ">= 14"
Expand Down
Loading

0 comments on commit f331fdb

Please sign in to comment.