@gesslar/sassy 0.20.0 → 0.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Session.js +11 -6
package/package.json
CHANGED
package/src/Session.js
CHANGED
|
@@ -39,6 +39,15 @@ export default class Session {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
async run() {
|
|
42
|
+
|
|
43
|
+
this.#building = true
|
|
44
|
+
await this.#command.asyncEmit("building")
|
|
45
|
+
this.#command.asyncEmit("recordBuildStart", this.#theme)
|
|
46
|
+
await this.#buildPipeline()
|
|
47
|
+
|
|
48
|
+
// This must come after, or you will fuck up the watching!
|
|
49
|
+
// Themes won't have their dependencies yet unless you build them
|
|
50
|
+
// at least once. - Samwise Gamgee
|
|
42
51
|
if(this.#options.watch) {
|
|
43
52
|
this.#command.emitter.on("closeSession", async() =>
|
|
44
53
|
await this.#handleCloseSession())
|
|
@@ -54,11 +63,6 @@ export default class Session {
|
|
|
54
63
|
|
|
55
64
|
await this.#resetWatcher()
|
|
56
65
|
}
|
|
57
|
-
|
|
58
|
-
this.#building = true
|
|
59
|
-
await this.#command.asyncEmit("building")
|
|
60
|
-
this.#command.asyncEmit("recordBuildStart", this.#theme)
|
|
61
|
-
await this.#buildPipeline()
|
|
62
66
|
}
|
|
63
67
|
|
|
64
68
|
/**
|
|
@@ -206,9 +210,10 @@ export default class Session {
|
|
|
206
210
|
* Handles a file change event and triggers a rebuild for the theme.
|
|
207
211
|
*
|
|
208
212
|
* @param {string} changed - Path to the changed file
|
|
213
|
+
* @param {object} _stats - OS-level file stat information
|
|
209
214
|
* @returns {Promise<void>}
|
|
210
215
|
*/
|
|
211
|
-
async #handleFileChange(changed) {
|
|
216
|
+
async #handleFileChange(changed, _stats) {
|
|
212
217
|
try {
|
|
213
218
|
if(this.#building)
|
|
214
219
|
return
|