From 2bbe1dc3d9a1af8033348affad3d6f4da6f306f6 Mon Sep 17 00:00:00 2001 From: mohamedsalem401 Date: Mon, 23 Sep 2024 18:19:34 +0300 Subject: [PATCH 1/2] Fix CLI installation and add Windows compatibility for scripts --- packages/cli/package.json | 3 ++- packages/core/package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index db7878e35d..49ef8c2f31 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -9,7 +9,8 @@ "dist" ], "scripts": { - "build": "BUILD_MODE=production webpack --config ./webpack.cli.ts", + "postinstall": "pnpm run build", + "build": "cross-env BUILD_MODE=production webpack --config ./webpack.cli.ts", "build:watch": "webpack --config ./webpack.cli.ts --watch", "lint": "eslint src", "patch": "npm version patch -m 'Bump v%s'", diff --git a/packages/core/package.json b/packages/core/package.json index 02657ddd67..43a78efb6a 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -68,7 +68,7 @@ "build": "npm run build-all", "build-all": "run-s build:*", "build:js": "node node_modules/grapesjs-cli/dist/cli.js build --patch=false --targets=\"> 1%, ie 11, safari 8, not dead\" --statsOutput=\"stats.json\" --localePath=\"src/i18n/locale\"", - "build:mjs": "BUILD_MODULE=true node node_modules/grapesjs-cli/dist/cli.js build --dts='skip' --patch=false --targets=\"> 1%, ie 11, safari 8, not dead\"", + "build:mjs": "cross-env BUILD_MODULE=true node node_modules/grapesjs-cli/dist/cli.js build --dts='skip' --patch=false --targets=\"> 1%, ie 11, safari 8, not dead\"", "build:css": "sass src/styles/scss/main.scss dist/css/grapes.min.css --no-source-map --style=compressed --load-path=node_modules", "ts:build": "node node_modules/grapesjs-cli/dist/cli.js build --dts='only' --patch=false", "ts:check": "tsc --noEmit --esModuleInterop dist/index.d.ts", From 18e18099673dba621a1d38e8693db28dc9670472 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 24 Sep 2024 11:40:38 +0400 Subject: [PATCH 2/2] Remove postinstall --- packages/cli/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 49ef8c2f31..03263a04d5 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -9,7 +9,6 @@ "dist" ], "scripts": { - "postinstall": "pnpm run build", "build": "cross-env BUILD_MODE=production webpack --config ./webpack.cli.ts", "build:watch": "webpack --config ./webpack.cli.ts --watch", "lint": "eslint src",