✨ chore: lots of improvements, exec apps with uwsm if in usage
also, started using `AstalWp.Endpoint.description` instead of the `name` property when showing device names, thanks to @NotMephisto in #9
This commit is contained in:
@@ -12,11 +12,11 @@ export class Stylesheet {
|
||||
"./style.scss"
|
||||
];
|
||||
|
||||
public compileSass(): void {
|
||||
public async compileSass(): Promise<void> {
|
||||
console.log("Stylesheet: Compiling Sass");
|
||||
|
||||
exec(`bash -c "sass ${this.#styles.map(style => `-I ${style}`).join('\s')
|
||||
} ${this.#outputPath.get_path()!}/style.css"`);
|
||||
exec(`bash -c "sass ${this.#styles.map(style => `-I ${style}`).join('\s')} ${
|
||||
this.#outputPath.get_path()!}/style.css"`);
|
||||
}
|
||||
|
||||
public async reapply(cssFilePath: string): Promise<void> {
|
||||
@@ -37,8 +37,10 @@ export class Stylesheet {
|
||||
}
|
||||
|
||||
public async compileApply(): Promise<void> {
|
||||
this.compileSass();
|
||||
this.reapply(this.#outputPath.get_path()! + "/style.css");
|
||||
await this.compileSass().catch((err: Gio.IOErrorEnum) =>
|
||||
console.error(`Stylesheet: An Error occurred and Sass couldn't be compiled. Stderr:\n${err.message ?
|
||||
`\t${err.message}\n` : ""}${err.stack}\n`)
|
||||
).then(() => this.reapply(this.#outputPath.get_path()! + "/style.css"));
|
||||
}
|
||||
|
||||
public static getDefault(): Stylesheet {
|
||||
|
||||
Reference in New Issue
Block a user