Skip to content

Commit

Permalink
Add skipValidate to watch command
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloSzx committed Nov 11, 2021
1 parent 9ee1548 commit abff05c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/forty-donkeys-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'bob-esbuild-cli': patch
---

Add skipValidate to watch command
2 changes: 1 addition & 1 deletion examples/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"lib"
],
"scripts": {
"dev": "bob-esbuild watch",
"dev": "bob-esbuild watch --onlyCJS",
"prepare": "bob-esbuild build && bob-tsm lib/index.js"
},
"dependencies": {
Expand Down
4 changes: 3 additions & 1 deletion packages/bob-cli/src/commands/watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ WatchCommand.option('--cwd <dir>', 'Change target current directory')
.option('--onlyCJS', 'Only build for CJS')
.option('--onlyESM', 'Only build for ESM')
.option('--onSuccess <cmd>', 'Execute script after successful JS build')
.action(async ({ cwd, input: inputFiles, bundle, clean, onSuccess, onlyCJS, onlyESM, skipTsc }) => {
.option('--skipValidate', 'Skip package.json validation')
.action(async ({ cwd, input: inputFiles, bundle, clean, onSuccess, onlyCJS, onlyESM, skipTsc, skipValidate }) => {
const { watcher } = await startWatch({
rollup: {
config: {
Expand All @@ -28,6 +29,7 @@ WatchCommand.option('--cwd <dir>', 'Change target current directory')
clean,
onlyCJS,
onlyESM,
skipValidate,
},
onSuccessCommand: onSuccess,
},
Expand Down

0 comments on commit abff05c

Please sign in to comment.