MCPcopy Index your code
hub / github.com/ember-cli/ember-cli / setupBroccoliWatcher

Method setupBroccoliWatcher

lib/models/watcher.js:39–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37 }
38
39 async setupBroccoliWatcher() {
40 let options = this.buildOptions();
41
42 logger.info('initialize %o', options);
43 this.watcher = this.watcher || (await this.constructBroccoliWatcher(options));
44
45 this.setupBroccoliChangeEvent();
46 this.watcher.on('buildStart', this._setupBroccoliWatcherBuild.bind(this));
47 this.watcher.on('buildSuccess', this.didChange.bind(this));
48
49 // build errors arriving via watcher
50 this.watcher.on('buildFailure', this.didError.bind(this));
51 // watcher specific errors
52 this.watcher.on('error', this.didError.bind(this));
53
54 this.serveURL = serveURL;
55 }
56
57 async constructBroccoliWatcher(options) {
58 const { Watcher } = require('broccoli');

Callers 1

buildMethod · 0.45

Calls 4

buildOptionsMethod · 0.95
onMethod · 0.45

Tested by

no test coverage detected