sp-dev-fx-webparts/samples/react-associated-sites-links/gulpfile.js

47 lines
1.1 KiB
JavaScript
Raw Normal View History

2022-10-14 21:22:42 -04:00
'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;
};
2022-10-14 21:26:52 -04:00
/* fast-serve */
const { addFastServe } = require("spfx-fast-serve-helpers");
addFastServe(build);
/* end of fast-serve */
2022-10-15 07:38:00 -04:00
// TailwindCSS
const postcss = require("gulp-postcss");
const atimport = require("postcss-import");
const tailwind = require("tailwindcss");
const tailwindcss = build.subTask(
"tailwindcss",
function (gulp, buildOptions, done) {
gulp
.src("assets/tailwind.css")
.pipe(
postcss([
atimport(),
tailwind("./tailwind.config.js"),
])
)
.pipe(gulp.dest("assets/dist"));
done();
}
);
build.rig.addPreBuildTask(tailwindcss);
// end TailwindCSS
2022-10-14 21:22:42 -04:00
build.initialize(require('gulp'));
2022-10-14 21:26:52 -04:00