Skip to content

Commit

Permalink
fix: show compilation errors when watching for changes (#30)
Browse files Browse the repository at this point in the history
* fix: show compilation errors when watching for changes

* chore: remove unused import
  • Loading branch information
amcgee committed Sep 5, 2019
1 parent 51c2994 commit 7bbdd5c
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 23 deletions.
8 changes: 8 additions & 0 deletions cli/src/lib/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,14 @@ const compile = async ({
} else if (event.code === 'BUNDLE_END') {
await copyOutput()
reporter.print('DONE')
} else if (event.code === 'ERROR') {
reporter.error(event.error)
} else if (event.code === 'FATAL') {
reporter.error(event.error)
reporter.error('Fatal error, aborting...')
process.exit(1)
} else {
reporter.debug('[watch] Encountered an unknown event', event)
}
})

Expand Down
60 changes: 37 additions & 23 deletions examples/simple-app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@
integrity sha512-2HWuvdTvb574rV0WuHmj0muhqyeWzvmDwkxAsesSKuAwB3O+Jd+LgeALsXADH3GOmh1/Q32C0udg6nl60CyCbA==

"@dhis2/cli-app-scripts@file:../../cli":
version "1.1.3"
version "1.2.1"
dependencies:
"@babel/core" "^7.3.3"
"@babel/plugin-proposal-class-properties" "^7.4.4"
Expand All @@ -825,7 +825,7 @@
"@babel/preset-react" "^7.0.0"
"@babel/preset-typescript" "^7.3.3"
"@dhis2/app-runtime" "^1.5.1"
"@dhis2/cli-helpers-engine" "^1.4.0"
"@dhis2/cli-helpers-engine" "^1.4.2"
"@dhis2/d2-i18n" "^1.0.5"
"@dhis2/ui-core" "^3.7.1"
babel-jest "^24.9.0"
Expand All @@ -842,17 +842,17 @@
prop-types "^15.7.2"
react "^16.8.6"
react-dom "^16.8.6"
rollup "^1.20.2"
rollup "^1.20.3"
rollup-plugin-babel "^4.3.2"
rollup-plugin-commonjs "^10.0.0"
rollup-plugin-commonjs "^10.1.0"
rollup-plugin-json "^4.0.0"
rollup-plugin-node-resolve "^5.0.1"
styled-jsx "^3.2.1"
styled-jsx "^3.2.2"

"@dhis2/cli-helpers-engine@^1.4.0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@dhis2/cli-helpers-engine/-/cli-helpers-engine-1.4.0.tgz#6371bce3017a5bc0c2b8ea84b77f253d75b8771e"
integrity sha512-2WLWJ5DcIiECmUlX2ChU2Wbqe/iJ42nDPQGjQXK1YzryNdnXyftUjJRwrLYWwaKGmWzfnPvpu8tvp+Yjysl78A==
"@dhis2/cli-helpers-engine@^1.4.2":
version "1.4.2"
resolved "https://registry.yarnpkg.com/@dhis2/cli-helpers-engine/-/cli-helpers-engine-1.4.2.tgz#91f8f928616a23e9f9cab10e7364ef3210565f05"
integrity sha512-mAdL/z5eo8DuO3CdtP6XNBEkGkP4bVCFvoHdmyCapV2sxbMUdlKvNUSzyOcVDVJD3imuo+BH80T8lToP88z9CA==
dependencies:
chalk "^2.4.2"
fs-extra "^8.0.1"
Expand Down Expand Up @@ -2156,7 +2156,7 @@ estraverse@^4.2.0:
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d"
integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==

estree-walker@^0.6.0, estree-walker@^0.6.1:
estree-walker@^0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362"
integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==
Expand Down Expand Up @@ -4737,7 +4737,7 @@ resolve@^1.10.0:
dependencies:
path-parse "^1.0.6"

resolve@^1.10.1, resolve@^1.11.0, resolve@^1.3.2:
resolve@^1.11.0, resolve@^1.3.2:
version "1.11.0"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.11.0.tgz#4014870ba296176b86343d50b60f3b50609ce232"
integrity sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==
Expand Down Expand Up @@ -4771,16 +4771,16 @@ rollup-plugin-babel@^4.3.2:
"@babel/helper-module-imports" "^7.0.0"
rollup-pluginutils "^2.3.0"

rollup-plugin-commonjs@^10.0.0:
version "10.0.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-10.0.0.tgz#58901ebe7ca44c2a03f0056de9bf9eb4a2dc8990"
integrity sha512-B8MoX5GRpj3kW4+YaFO/di2JsZkBxNjVmZ9LWjUoTAjq8N9wc7HObMXPsrvolVV9JXVtYSscflXM14A19dXPNQ==
rollup-plugin-commonjs@^10.1.0:
version "10.1.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-10.1.0.tgz#417af3b54503878e084d127adf4d1caf8beb86fb"
integrity sha512-jlXbjZSQg8EIeAAvepNwhJj++qJWNJw1Cl0YnOqKtP5Djx+fFGkp3WRh+W0ASCaFG5w1jhmzDxgu3SJuVxPF4Q==
dependencies:
estree-walker "^0.6.0"
estree-walker "^0.6.1"
is-reference "^1.1.2"
magic-string "^0.25.2"
resolve "^1.10.1"
rollup-pluginutils "^2.7.0"
resolve "^1.11.0"
rollup-pluginutils "^2.8.1"

rollup-plugin-json@^4.0.0:
version "4.0.0"
Expand All @@ -4800,17 +4800,17 @@ rollup-plugin-node-resolve@^5.0.1:
resolve "^1.11.0"
rollup-pluginutils "^2.8.0"

rollup-pluginutils@^2.3.0, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.7.0, rollup-pluginutils@^2.8.0:
rollup-pluginutils@^2.3.0, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.8.0, rollup-pluginutils@^2.8.1:
version "2.8.1"
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.1.tgz#8fa6dd0697344938ef26c2c09d2488ce9e33ce97"
integrity sha512-J5oAoysWar6GuZo0s+3bZ6sVZAC0pfqKz68De7ZgDi5z63jOVZn1uJL/+z1jeKHNbGII8kAyHF5q8LnxSX5lQg==
dependencies:
estree-walker "^0.6.1"

rollup@^1.20.2:
version "1.20.2"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.20.2.tgz#0e1be13cb5de244c9c463027092f7c93461558b9"
integrity sha512-pF4jFzNWMUuudIAeiTgOcSxn8XkBN2Y2/IwPR7iL/IZ8k9RwoLyp2QwNWiYT+HF537zwpmzZHTBYw345H9vq1A==
rollup@^1.20.3:
version "1.20.3"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.20.3.tgz#6243f6c118ca05f56b2d9433112400cd834a1eb8"
integrity sha512-/OMCkY0c6E8tleeVm4vQVDz24CkVgvueK3r8zTYu2AQNpjrcaPwO9hE+pWj5LTFrvvkaxt4MYIp2zha4y0lRvg==
dependencies:
"@types/estree" "0.0.39"
"@types/node" "^12.7.2"
Expand Down Expand Up @@ -5207,6 +5207,20 @@ styled-jsx@^3.2.1:
stylis "3.5.4"
stylis-rule-sheet "0.0.10"

styled-jsx@^3.2.2:
version "3.2.2"
resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-3.2.2.tgz#03d02d26725195d17b6a979eb8d7c34761a16bf8"
integrity sha512-Xb9TPFY2REShznvHt/fw78wk+nxejTr8poepDeS5fRvkQ7lW49CDIWWGLzzALCLcKBIRFK/1Wi4PDZNetpig4w==
dependencies:
babel-plugin-syntax-jsx "6.18.0"
babel-types "6.26.0"
convert-source-map "1.6.0"
loader-utils "1.2.3"
source-map "0.7.3"
string-hash "1.1.3"
stylis "3.5.4"
stylis-rule-sheet "0.0.10"

[email protected]:
version "0.0.10"
resolved "https://registry.yarnpkg.com/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz#44e64a2b076643f4b52e5ff71efc04d8c3c4a430"
Expand Down

0 comments on commit 7bbdd5c

Please sign in to comment.