Skip to content

Commit

Permalink
fix: LESS styles building for WebApp (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElderJames authored Aug 21, 2024
1 parent 37f9fce commit cdbea44
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .template.config/templates/webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"version": "1.0.0",
"description": "An out-of-box UI solution for enterprise applications as a Blazor boilerplate.",
"scripts": {
"start": "dotnet watch -p ./src/Server run",
"start": "dotnet watch -p ./src/AntDesign.Pro.Template run",
"build": "dotnet publish -o dist",
"gulp:pro": "gulp --gulpfile ./src/Client/gulpfile.js",
"gulp:pro": "gulp --gulpfile ./src/AntDesign.Pro.Template.Client/gulpfile.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
Expand Down
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 () {
});

0 comments on commit cdbea44

Please sign in to comment.