44 lines
1012 B
JavaScript
44 lines
1012 B
JavaScript
|
'use strict';
|
||
|
|
||
|
const build = require('@microsoft/sp-build-web');
|
||
|
|
||
|
build.addSuppression(`Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe.`);
|
||
|
|
||
|
var getTasks = build.rig.getTasks;
|
||
|
build.rig.getTasks = function () {
|
||
|
var result = getTasks.call(build.rig);
|
||
|
|
||
|
result.set('serve', result.get('serve-deprecated'));
|
||
|
|
||
|
return result;
|
||
|
};
|
||
|
|
||
|
/* tailwind */
|
||
|
const postcss = require("gulp-postcss");
|
||
|
const tailwind = require("tailwindcss");
|
||
|
|
||
|
const tailwindcss = build.subTask(
|
||
|
"tailwindcss",
|
||
|
function (gulp, buildOptions, done) {
|
||
|
gulp
|
||
|
.src("assets/tailwind.css")
|
||
|
.pipe(
|
||
|
postcss([
|
||
|
tailwind("./tailwind.config.js"),
|
||
|
])
|
||
|
)
|
||
|
.pipe(gulp.dest("assets/dist"));
|
||
|
done();
|
||
|
}
|
||
|
);
|
||
|
build.rig.addPreBuildTask(tailwindcss);
|
||
|
/* end of tailwind */
|
||
|
|
||
|
/* fast-serve */
|
||
|
const { addFastServe } = require("spfx-fast-serve-helpers");
|
||
|
addFastServe(build);
|
||
|
/* end of fast-serve */
|
||
|
|
||
|
build.initialize(require('gulp'));
|
||
|
|