Combining multiple SASS files into one SASS file

Does anyone know if there is a way to combine multiple SASS / SCSS files into one SASS / SCSS file . I mean "into one SASS / SCSS" and not into a CSS file.

For example, I have 3 scss files:

  • app.scss

  • base.scss

  • layout.scss

The app.scss file contains 2 imports for base.scss

and layout.scss

.

I would like to be able to generate 1 SCSS file that basically concatenates files and does not handle sass.

This is a bit tricky to find, since everything that generates income has to do with CSS concatenation.

Why do I want to do this? Basically, I would like to easily reference a set of SCSS files from codecen (another online code editor).

thank

+3


source to share


1 answer


I analyze all files by mask, find all imports inside and combine them into one file. So I don't need one entry point



npm install -D bundle-scss

"script": {
  "postbuild": "npm run themes",
  "themes": "bundle-scss -m \"./src/**/*.theme.scss\" -d \"./dist/themes.scss\""
}

      

0


source







All Articles