Skip to content

Commit ebe267a

Browse files
Remove usbLiveSyncService.isInitialized check
In case LiveSync process is currently running, `before-prepare` hook must not run the `tsc` compiler. We've been doing this by checking a special property from CLI - `usbLiveSyncService.isInitialized`. However, there's no need to use this service - we have the information if we have started `tsc` process, so just use it instead of relying on `usbLiveSyncService`. This will allow us to remove the usbLiveSyncService from CLI as it is no longer used anywhere.
1 parent fd6d884 commit ebe267a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/before-prepare.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var compiler = require('./compiler');
22

3-
module.exports = function ($logger, $projectData, $usbLiveSyncService) {
4-
var liveSync = $usbLiveSyncService.isInitialized;
3+
module.exports = function ($logger, $projectData) {
4+
var liveSync = !!compiler.getTscProcess();
55
var bundle = $projectData.$options.bundle;
66
if (liveSync || bundle) {
77
return;

0 commit comments

Comments
 (0)