From f3863918d6ca5473658223114192af5c344e18a1 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Mon, 25 Nov 2024 19:42:23 +0100 Subject: [PATCH] chore: run build on prepack --- .licenseignore | 3 ++- .npmignore | 5 +++++ package.json | 6 ++++-- 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 .npmignore diff --git a/.licenseignore b/.licenseignore index 16c3bf3..c7d4ccd 100644 --- a/.licenseignore +++ b/.licenseignore @@ -19,6 +19,7 @@ package-lock.json rollup.config.js \.editorconfig \.gitignore +\.npmignore \.licenseignore flake.nix -flake.lock \ No newline at end of file +flake.lock diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..41ae6d5 --- /dev/null +++ b/.npmignore @@ -0,0 +1,5 @@ +node_modules +ignore +tests +docs +.env diff --git a/package.json b/package.json index c1dc38d..32761d9 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,8 @@ "rollup-plugin-visualizer": "^5.9.2" }, "scripts": { - "build": "rm -rf ./dist/ && npm run build:bundle && npm run build:minify", + "clean": "rm -rf ./dist/", + "build": "npm run clean && npm run build:bundle && npm run build:minify", "build:bundle": "rollup -c", "build:minify": "minify ./dist/doip.core.js > ./dist/doip.core.min.js && minify ./dist/doip.fetchers.js > ./dist/doip.fetchers.min.js && minify ./dist/doip.fetchers.minimal.js > ./dist/doip.fetchers.minimal.min.js", "license:check": "license-check-and-add check", @@ -69,7 +70,8 @@ "lint:fix": "eslint ./src --fix", "pretest": "node ./prerelease.js && npm run lint && npm run license:check", "test": "mocha", - "prepare": "husky install" + "prepare": "husky install", + "prepack": "npm run build" }, "repository": { "type": "git",