deno.land / x / packup@v0.1.12 / sass_util.ts

sass_util.ts
View Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/** Compiles the given string into css. * * TODO(kt3k): Support importer */export async function compile(text: string): Promise<string> { // Use dynamic import because sass.js is slow to import const start = performance.now(); console.log("Importing sass"); const { Sass } = await import("./vendor/" + "sass/mod.ts"); console.log(`Imported sass in ${(performance.now() - start).toFixed(1)}ms`); return new Promise((resolve, reject) => { // deno-lint-ignore no-explicit-any Sass.compile(text, (result: any) => { if (result.status === 0) { resolve(result.text); } else { reject(new Error(result.message)); } }); });}
packup
📦 Zero-config web application packager in Deno
GitHub Repositorykt3k/packup
GitHub Stars
260

Version Info

Tagged at
4 months ago