-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: LESS styles building for WebApp (#189)
- Loading branch information
1 parent
37f9fce
commit cdbea44
Showing
2 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
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
26 changes: 26 additions & 0 deletions
26
.template.config/templates/webapp/src/AntDesign.Pro.Template.Client/gulpfile.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
var gulp = require('gulp'), | ||
cleanCss = require('gulp-clean-css'), | ||
less = require('gulp-less'), | ||
rename = require('gulp-rename'), | ||
concatCss = require("gulp-concat-css"), | ||
npmImport = require("less-plugin-npm-import"); | ||
|
||
gulp.task('less', function () { | ||
return gulp | ||
.src([ | ||
'**/*.less', | ||
'!node_modules/**', | ||
'!**/bin/**', | ||
'!**/obj/**' | ||
]) | ||
.pipe(less({ | ||
javascriptEnabled: true, | ||
plugins: [new npmImport({ prefix: '~' })] | ||
})) | ||
.pipe(concatCss('site.css')) | ||
.pipe(cleanCss({ compatibility: '*' })) | ||
.pipe(gulp.dest('wwwroot/css')); | ||
}); | ||
|
||
gulp.task('default', gulp.parallel('less'), function () { | ||
}); |