chore: add sass to build pipeline

This commit is contained in:
Oliver Booth 2023-08-04 12:45:10 +01:00
parent d24b492b91
commit 46008c2acb
Signed by: oliverbooth
GPG Key ID: 725DB725A0D9EE61
4 changed files with 2175 additions and 4 deletions

17
Gulpfile.js Normal file
View File

@ -0,0 +1,17 @@
const gulp = require('gulp');
const sass = require('gulp-sass')(require('node-sass'));
const cleanCSS = require('gulp-clean-css');
const rename = require('gulp-rename');
const srcDir = 'src/scss'; // Update with your SCSS source directory
const destDir = 'oliverbooth.dev/wwwroot/css'; // Update with your CSS output directory
function compileSCSS() {
return gulp.src(`${srcDir}/**/*.scss`)
.pipe(sass().on('error', sass.logError))
.pipe(cleanCSS({ compatibility: 'ie11' }))
.pipe(rename({ suffix: '.min' }))
.pipe(gulp.dest(destDir));
}
exports.default = compileSCSS;

View File

@ -6,6 +6,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
ProjectSection(SolutionItems) = preProject
README.md = README.md
package.json = package.json
Gulpfile.js = Gulpfile.js
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{8A323E64-E41E-4780-99FD-17BF58961FB5}"

2157
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -21,6 +21,8 @@
"devDependencies": {
"gulp": "^4.0.2",
"gulp-clean-css": "^4.3.0",
"gulp-sass": "^5.1.0"
"gulp-rename": "^2.0.0",
"gulp-sass": "^5.1.0",
"node-sass": "^9.0.0"
}
}