Requires npm install --global gulp-cli
Last active
February 3, 2022 21:23
-
-
Save EdCharbeneau/c03b30eb3f2b966c7dcf596a62c47414 to your computer and use it in GitHub Desktop.
Minimal Gulp for Telerik Themes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import "~@progress/kendo-theme-bootstrap/dist/all"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
const gulp = require('gulp'); | |
const sass = require('gulp-sass')(require('sass')); | |
// An importer that redirects relative URLs starting with "~" to | |
// `node_modules`. | |
function packageImporter(url) { | |
// If the doesn't start with ~, return it as is. | |
if (!url.startsWith('~')) { | |
return null; | |
} | |
const nodeModules = path.resolve('./node_modules'); | |
// Create a new url to the correct location | |
const file = path.resolve( | |
nodeModules, | |
url.slice(1) | |
); | |
return { file }; | |
} | |
gulp.task('sass', function () { | |
return gulp.src('./sass/**/*.scss') | |
.pipe(sass({ importer: [packageImporter]}).on('error', sass.logError)) | |
.pipe(gulp.dest('./wwwroot/css')); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "sass-theme", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "ISC", | |
"devDependencies": { | |
"sass": "^1.49.7", | |
"@progress/kendo-theme-bootstrap": "^5.1.1", | |
"gulp": "^4.0.2", | |
"gulp-sass": "^5.1.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment