add prepublish script
This commit is contained in:
12
src/Umbraco.Web.UI.Client/devops/publish/cleanse-pkg.js
Normal file
12
src/Umbraco.Web.UI.Client/devops/publish/cleanse-pkg.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import { readFileSync, writeFileSync } from 'fs';
|
||||
|
||||
const packageFile = './package.json';
|
||||
const packageJson = JSON.parse(readFileSync(packageFile, 'utf8'));
|
||||
|
||||
/**
|
||||
* Here we will modify the package.json to remove dependencies that are not needed in the CMS or does not work on npm.
|
||||
*/
|
||||
delete packageJson.dependencies['router-slot'];
|
||||
|
||||
// Write the package.json back to disk
|
||||
writeFileSync(packageFile, JSON.stringify(packageJson, null, 2), 'utf8');
|
||||
@@ -89,7 +89,8 @@
|
||||
"wc-analyze:vscode": "wca **/*.element.ts --format vscode --outFile dist-cms/vscode-html-custom-data.json",
|
||||
"new-extension": "plop --plopfile ./devops/plop/plop.js",
|
||||
"compile": "tsc",
|
||||
"check": "npm run lint && npm run compile && npm run build-storybook"
|
||||
"check": "npm run lint && npm run compile && npm run build-storybook",
|
||||
"prepublish": "node ./devops/publish/cleanse-pkg.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.14 <19",
|
||||
|
||||
Reference in New Issue
Block a user