()
| 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) { |
nothing calls this directly
no test coverage detected