From 8c0602273020f6f719c82c21dd00ee479961bea6 Mon Sep 17 00:00:00 2001 From: Stiekel Date: Tue, 13 Sep 2022 10:12:58 +0800 Subject: [PATCH] fix npm script cp-prettier not work on windows --- package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 3f31277f..b19dbc42 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "codemirror": "^5.36.0", "commander": "~6.1.0", "concurrently": "^5.0.0", + "copyfiles": "^2.4.1", "cross-env": "^7.0.0", "dragula": "^3.7.2", "eslint": "^7.1.0", @@ -62,6 +63,7 @@ "file-saver": "^2.0.0", "jszip": "^3.1.5", "medium-editor": "^5.23.3", + "mkdirp": "^1.0.4", "pre-commit": "1.x", "prop-types": "^15.6.1", "react": "^16.6.0", @@ -72,6 +74,7 @@ "react-redux": "^7.0.2", "redux": "^4.0.1", "redux-logger": "^3.0.6", + "rimraf": "^3.0.2", "stylelint": "^13.0.0", "stylelint-config-standard": "^20.0.0" }, @@ -88,7 +91,7 @@ "build-templates": "bisheng build -c ./site/bisheng.templates.config.js", "build": "npm run cp-prettier && cross-env NODE_ENV=production concurrently \"npm run build-index\" \"npm run build-edit\" \"npm run build-templates\"", "site": "npm run build", - "cp-prettier": "rm -rf _site && mkdir -p ./_site/edit && cp -r ./prettier/* ./_site/edit ", + "cp-prettier": "rimraf _site && mkdirp ./_site/edit && copyfiles ./prettier/* ./_site/edit", "deploy": "npm run site && cp CNAME _site && bisheng gh-pages --push-only", "lint": "npm run lint:es && npm run lint:style", "lint:es": "eslint --fix --ext '.js,.jsx' site",