Skip to content

Commit cdbea44

Browse files
authored
fix: LESS styles building for WebApp (#189)
1 parent 37f9fce commit cdbea44

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

.template.config/templates/webapp/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"version": "1.0.0",
44
"description": "An out-of-box UI solution for enterprise applications as a Blazor boilerplate.",
55
"scripts": {
6-
"start": "dotnet watch -p ./src/Server run",
6+
"start": "dotnet watch -p ./src/AntDesign.Pro.Template run",
77
"build": "dotnet publish -o dist",
8-
"gulp:pro": "gulp --gulpfile ./src/Client/gulpfile.js",
8+
"gulp:pro": "gulp --gulpfile ./src/AntDesign.Pro.Template.Client/gulpfile.js",
99
"test": "echo \"Error: no test specified\" && exit 1"
1010
},
1111
"dependencies": {
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
var gulp = require('gulp'),
2+
cleanCss = require('gulp-clean-css'),
3+
less = require('gulp-less'),
4+
rename = require('gulp-rename'),
5+
concatCss = require("gulp-concat-css"),
6+
npmImport = require("less-plugin-npm-import");
7+
8+
gulp.task('less', function () {
9+
return gulp
10+
.src([
11+
'**/*.less',
12+
'!node_modules/**',
13+
'!**/bin/**',
14+
'!**/obj/**'
15+
])
16+
.pipe(less({
17+
javascriptEnabled: true,
18+
plugins: [new npmImport({ prefix: '~' })]
19+
}))
20+
.pipe(concatCss('site.css'))
21+
.pipe(cleanCss({ compatibility: '*' }))
22+
.pipe(gulp.dest('wwwroot/css'));
23+
});
24+
25+
gulp.task('default', gulp.parallel('less'), function () {
26+
});

0 commit comments

Comments
 (0)