Hello,
I’m trying to compile all sass files into a single CSS file which will be used as a global CSS file in the project. I’m using Aurelia CLI v1.3.1. I have the following structure.
-src
--content
--sass
main.scss
--css
main.css
Tried the following approach
In the Aurelia.json file added a destination path where all the SASS will be compiled. As well modified process-css.ts file in the tasks folder. But when I try to build the project it generates some new folders which I don’t want.
process-css.ts File
import {build} from 'aurelia-cli';
import * as gulp from 'gulp';
import * as project from '../aurelia.json';
import * as sass from 'gulp-dart-sass';
export default function processCSS() {
return gulp.src(project.cssProcessor.source, {sourcemaps: true})
.pipe(sass.sync().on('error', sass.logError))
.pipe(gulp.dest(project.cssProcessor.dtsSource))
.pipe(build.bundle());
}
Aurelia.json file
"cssProcessor": {
"source": [
"src/**/*.scss"
]
"dtsSource:" [
"src/content/css/main.css"
]
}