bahmutov / bahmutov/cypress-angular-unit-test

Loading styles (CSS/SCSS/SASS) stored under assets for all components

Open
#184 14 comments 0 reactions 1 assignee Claimed by @LeJeanbono View on GitHub
💡 enhancement
Dominant language
TypeScript
Stars
160
Forks
32
PR merge metrics
No merged PRs in 30d

Description

Hi @LeJeanbono this is a question in regards to the assets.
At the moment the project I am trying to get to load assets for all components with styles stored in subfolders under assets. Now I am not sure exactly what each component requires, but is it possible to load all those assets stored in subfolders of subfolders and bundle them up. Cos at the moment I need to do the following:

```setConfig({ cssFiles: [
"src/app/login/login.component.scss",
// "src/assets/styles/main.scss",
// "src/assets/styles/partials/_all.scss",
// "src/assets/styles/base/_all.scss",
"node_modules/primeng/resources/primeng.min.css",
"node_modules/@fullcalendar/core/main.css",
"node_modules/@fullcalendar/daygrid/main.css",
"node_modules/quill/dist/quill.snow.css",
"node_modules/primeicons/primeicons.css",
"src/assets/styles/variables.css",
], stylesheets: [
"/assets/monaco/vs/loader.js",
"/assets/styles/partials/_common.scss",
"/assets/styles/partials/_dashboard.scss",
"/assets/styles/partials/_forms.scss",
"/assets/styles/partials/_icons.scss",
"/assets/styles/partials/_login.scss",
"/assets/styles/partials/_main.scss",
"/assets/styles/partials/_menu.scss",
"/assets/styles/partials/_message.scss",
"/assets/styles/partials/_misc.scss",
"/assets/styles/partials/_overlay.scss",
"/assets/styles/partials/_panel.scss",
"/assets/styles/partials/_quick-actions.scss",
"/assets/styles/partials/_splash.scss",
"/assets/styles/partials/_utils.scss",
"/assets/styles/partials/_data.scss",
"/assets/styles/base/_common.scss",
"/assets/styles/base/_defaults.scss",
"/assets/styles/base/_fonts.scss",
"/assets/styles/base/_layout.scss",
"/styles.scss",
], detectChanges: true });```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.