MCPcopy Create free account
hub / github.com/bigcommerce/stencil-cli / run

Method run

lib/ScssValidator.js:17–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15 }
16
17 async run() {
18 const assetsPath = path.join(this.themePath, 'assets');
19 const stylesPath = path.join(this.themePath, 'assets/scss');
20 const rawConfig = await this.themeConfig.getConfig();
21 const cssFiles = await this.getCssFiles();
22 for await (const file of cssFiles) {
23 try {
24 /* eslint-disable-next-line no-await-in-loop */
25 await cssCompiler.compile(
26 rawConfig,
27 assetsPath,
28 file,
29 cssCompiler.SASS_ENGINE_NAME,
30 );
31 } catch (e) {
32 const message = this.parseStencilStylesError(e);
33 throw new Error(
34 `${message} while compiling css files from "${stylesPath}/${file}".`.red,
35 );
36 }
37 }
38 }
39
40 parseStencilStylesError(e) {
41 if (e.formatted) {

Callers

nothing calls this directly

Calls 3

getCssFilesMethod · 0.95
getConfigMethod · 0.80

Tested by

no test coverage detected