Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
chore: Add script intermediary (#309)
Browse files Browse the repository at this point in the history
* chore: small indirection to exec studio cli universally

* chore: update studio npm script to target indirection file
  • Loading branch information
xdrdak authored Apr 28, 2022
1 parent 25d6782 commit a765128
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"prepublish:npm": "pnpm build",
"publish:npm": "pnpm publish --access public",
"start": "nest start",
"studio": "./studio.sh",
"studio": "node ./scripts/run-cli.js",
"test": "jest --runInBand --forceExit",
"test:integration": "jest --runInBand --forceExit --config jest.integration.config.js",
"test:watch": "jest --watch"
Expand Down
10 changes: 10 additions & 0 deletions scripts/run-cli.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const { execSync } = require('child_process');

const isWin = process.platform === 'win32';
const args = process.argv.slice(2).join(' ');

if (isWin) {
execSync(`studio.bat ${args}`, { stdio: 'inherit' });
} else {
execSync(`./studio.sh ${args}`, { stdio: 'inherit' });
}

0 comments on commit a765128

Please sign in to comment.