Skip to content

Commit b5d26b5

Browse files
authored
Add build:clean script, use in prepublishOnly (#71)
This will prevent us from publishing unused files. The is implemented per the module template. Uses `rimraf`.
1 parent 7025771 commit b5d26b5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@
2121
"scripts": {
2222
"test": "jest",
2323
"test:watch": "jest --watch",
24-
"prepublishOnly": "yarn build && chmod +x dist/cli.js && yarn lint && yarn test",
24+
"prepublishOnly": "yarn build:clean && chmod +x dist/cli.js && yarn lint && yarn test",
2525
"lint:eslint": "eslint . --cache --ext js,ts",
2626
"lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' '**/*.yml' --ignore-path .gitignore",
2727
"lint": "yarn lint:eslint && yarn lint:misc --check",
2828
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write",
29+
"build:clean": "rimraf dist && yarn build",
2930
"build": "tsc --project .",
3031
"changelog": "node dist/cli.js"
3132
},
@@ -56,6 +57,7 @@
5657
"jest": "^26.4.2",
5758
"outdent": "^0.8.0",
5859
"prettier": "^2.2.1",
60+
"rimraf": "^3.0.2",
5961
"ts-jest": "^26.5.6",
6062
"typescript": "^4.2.4"
6163
}

0 commit comments

Comments
 (0)