Skip to content

Commit

Permalink
Fix yarn workspace issue on Windows with node script (#2452)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Kraft authored Mar 1, 2022
1 parent 055cccd commit caa9200
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/backend/bindings/capacitor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@
"verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin && cd ..",
"verify:android": "cd android && ./gradlew clean build test && cd ..",
"verify:web": "npm run build",
"build": "npm run clean && tsc && rollup -c rollup.config.js",
"build": "node ./scripts/build.js",
"build:clean" : "rimraf ./dist",
"build:bundle": "tsc && rollup -c rollup.config.js",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
"preinstall": "npm run clean && npm run build"
"preinstall": "npm run build"
},
"private": true,
"repository": {
Expand Down
7 changes: 7 additions & 0 deletions packages/backend/bindings/capacitor/scripts/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const { resolve } = require('path');
const { spawnSync } = require('child_process')

spawnSync(process.platform === 'win32' ? 'yarn.cmd' : 'yarn', ['build:clean', 'build:bundle'], {
stdio: "inherit",
cwd: resolve(__dirname, '../'),
})

0 comments on commit caa9200

Please sign in to comment.