Skip to content

Commit e4c5a22

Browse files
authored
all: clean and build dependencies in prepublishOnly scripts (#313)
Co-authored-by: Sebastian Alex <[email protected]>
1 parent b7f19b3 commit e4c5a22

File tree

13 files changed

+15
-13
lines changed

13 files changed

+15
-13
lines changed

packages/browser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"clean": "rimraf \"lib\"",
1313
"format": "prettier --write '**/*.ts'",
1414
"lint": "eslint . --ext .ts",
15-
"prepublishOnly": "cross-env NODE_ENV=production npm run build",
15+
"prepublishOnly": "npm -w ../sdk-core run prepublishOnly && npm run clean && cross-env NODE_ENV=production npm run build",
1616
"watch": "concurrently \"tsc -p tsconfig.build.json --noEmit --watch\" \"rollup -c rollup.config.mjs --watch\"",
1717
"test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" NODE_NO_WARNINGS=1 NODE_ENV=test jest"
1818
},

packages/electron/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"clean": "rimraf main renderer common",
6565
"format": "prettier --write '**/*.ts'",
6666
"lint": "eslint src --ext .ts",
67-
"prepublishOnly": "cross-env NODE_ENV=production npm run build",
67+
"prepublishOnly": "npm run clean && cross-env NODE_ENV=production npm run build",
6868
"watch": "concurrently \"tsc -p tsconfig.main.json --noEmit --watch\" \"tsc -p tsconfig.renderer.json --noEmit --watch\" \"rollup -c rollup.config.mjs --watch\""
6969
},
7070
"keywords": [

packages/nestjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"clean": "rimraf \"lib\"",
1212
"format": "prettier --write '**/*.ts'",
1313
"lint": "eslint . --ext .ts",
14-
"prepublishOnly": "cross-env NODE_ENV=production npm run build",
14+
"prepublishOnly": "npm run clean && cross-env NODE_ENV=production npm run build",
1515
"watch": "concurrently \"tsc -p tsconfig.build.json --noEmit --watch\" \"rollup -c rollup.config.mjs --watch\"",
1616
"test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" NODE_NO_WARNINGS=1 NODE_ENV=test jest"
1717
},

packages/node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"clean": "rimraf lib tsconfig.tsbuildinfo",
1212
"format": "prettier --write '**/*.ts'",
1313
"lint": "eslint . --ext .ts",
14-
"prepublishOnly": "cross-env NODE_ENV=production npm run build",
14+
"prepublishOnly": "npm run clean && cross-env NODE_ENV=production npm run build",
1515
"watch": "concurrently \"tsc -p tsconfig.build.json --noEmit --watch\" \"rollup -c rollup.config.mjs --watch\"",
1616
"test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" NODE_NO_WARNINGS=1 NODE_ENV=test jest"
1717
},

packages/react-native/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"build": "bob build",
3131
"clean": "rimraf \"lib\"",
3232
"format:check": "eslint \"**/*.{js,ts,tsx}\"",
33-
"prepublishOnly": "bob build",
33+
"prepublishOnly": "npm run clean && cross-env NODE_ENV=production bob build",
3434
"test": "cross-env NODE_ENV=test jest"
3535
},
3636
"keywords": [

packages/react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"clean": "rimraf \"lib\"",
1313
"format": "prettier --write '**/*.ts'",
1414
"lint": "eslint . --ext .ts",
15-
"prepublishOnly": "cross-env NODE_ENV=production npm run build",
15+
"prepublishOnly": "npm -w ../browser run prepublishOnly && npm run clean && cross-env NODE_ENV=production npm run build",
1616
"watch": "concurrently \"tsc -p tsconfig.build.json --noEmit --watch\" \"rollup -c rollup.config.mjs --watch\"",
1717
"test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" NODE_NO_WARNINGS=1 NODE_ENV=test jest"
1818
},

packages/sdk-core/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"format": "prettier --write '**/*.ts'",
1313
"lint": "eslint . --ext .ts",
1414
"watch": "concurrently \"tsc -p tsconfig.build.json --noEmit --watch\" \"rollup -c rollup.config.mjs --watch\"",
15-
"test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" NODE_NO_WARNINGS=1 NODE_ENV=test jest"
15+
"test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" NODE_NO_WARNINGS=1 NODE_ENV=test jest",
16+
"prepublishOnly": "npm run clean && cross-env NODE_ENV=production npm run build"
1617
},
1718
"repository": {
1819
"type": "git",

packages/session-replay/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"format": "prettier --write '**/*.ts'",
1414
"lint": "eslint . --ext .ts",
1515
"watch": "concurrently \"tsc -p tsconfig.build.json --noEmit --watch\" \"rollup -c rollup.config.mjs --watch\"",
16-
"prepublishOnly": "cross-env NODE_ENV=production npm run clean && npm run build",
16+
"prepublishOnly": "npm -w ../sdk-core run prepublishOnly && npm run clean && cross-env NODE_ENV=production npm run build",
1717
"test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" NODE_NO_WARNINGS=1 NODE_ENV=test jest"
1818
},
1919
"repository": {

tools/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"clean": "tsc -b --clean && rimraf \"lib\"",
1616
"format": "prettier --write '**/*.ts'",
1717
"lint": "eslint . --ext .ts",
18-
"prepublishOnly": "cross-env NODE_ENV=production npm run build",
18+
"prepublishOnly": "npm run clean && cross-env NODE_ENV=production npm run build",
1919
"watch": "tsc -w",
2020
"start": "node lib/index.js",
2121
"test": "cross-env NODE_ENV=test jest"

tools/rollup-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"build:rollup": "rollup --config rollup.config.js",
1313
"clean": "tsc -b ./tsconfig.build.json --clean && rimraf \"lib\"",
1414
"format": "prettier --write '**/*.ts'",
15-
"prepublishOnly": "cross-env NODE_ENV=production npm run build",
15+
"prepublishOnly": "npm run clean && cross-env NODE_ENV=production npm run build",
1616
"lint": "eslint . --ext .ts",
1717
"watch": "tsc -b ./tsconfig.build.json -w"
1818
},

0 commit comments

Comments
 (0)