2019-09-05 13:49:19 -04:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
// check if gulp dist was called
|
|
|
|
if (process.argv.indexOf('dist') !== -1) {
|
|
|
|
// add ship options to command call
|
|
|
|
process.argv.push('--ship');
|
|
|
|
}
|
|
|
|
|
|
|
|
const path = require('path');
|
|
|
|
const gulp = require('gulp');
|
|
|
|
const build = require('@microsoft/sp-build-web');
|
|
|
|
const gulpSequence = require('gulp-sequence');
|
|
|
|
|
|
|
|
build.addSuppression(`Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe.`);
|
|
|
|
|
|
|
|
// Create clean distrubution package
|
|
|
|
gulp.task('dist', gulpSequence('clean', 'bundle', 'package-solution'));
|
|
|
|
// Create clean development package
|
|
|
|
gulp.task('dev', gulpSequence('clean', 'bundle', 'package-solution'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom Framework Specific gulp tasks
|
|
|
|
*/
|
|
|
|
|
2021-10-20 01:10:41 -04:00
|
|
|
var getTasks = build.rig.getTasks;
|
|
|
|
build.rig.getTasks = function () {
|
|
|
|
var result = getTasks.call(build.rig);
|
2019-09-05 13:49:19 -04:00
|
|
|
|
2021-10-20 01:10:41 -04:00
|
|
|
result.set('serve', result.get('serve-deprecated'));
|
|
|
|
|
|
|
|
return result;
|
|
|
|
};
|
2019-09-05 13:49:19 -04:00
|
|
|
build.initialize(gulp);
|