Skip to content

Commit

Permalink
Log updates and errors
Browse files Browse the repository at this point in the history
  • Loading branch information
hum-n committed Mar 13, 2021
1 parent 1c421ba commit fd3fc98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"format": "prettier --write --ignore-unknown '**/*'"
},
"dependencies": {
"create-serve": "^1.0.0",
"create-serve": "^1.0.1",
"esbuild": "^0.9.0"
},
"devDependencies": {
Expand Down
5 changes: 3 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import esbuild from 'esbuild';
import serve from 'create-serve';
import serve, { error, log } from 'create-serve';

export const isWatch = process.argv.includes('-w');

Expand All @@ -8,8 +8,9 @@ const esbuildServe = async (options = {}, serveOptions = {}) => {
.build({
...options,
watch: isWatch && {
onRebuild() {
onRebuild(err) {
serve.update();
err ? error('× Failed') : log('✓ Updated');
}
}
})
Expand Down

0 comments on commit fd3fc98

Please sign in to comment.