diff --git a/.template.config/templates/webapp/package.json b/.template.config/templates/webapp/package.json index 7ba348af..c986cb46 100644 --- a/.template.config/templates/webapp/package.json +++ b/.template.config/templates/webapp/package.json @@ -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": { diff --git a/.template.config/templates/webapp/src/AntDesign.Pro.Template.Client/gulpfile.js b/.template.config/templates/webapp/src/AntDesign.Pro.Template.Client/gulpfile.js new file mode 100644 index 00000000..b46488e2 --- /dev/null +++ b/.template.config/templates/webapp/src/AntDesign.Pro.Template.Client/gulpfile.js @@ -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 () { +}); \ No newline at end of file