Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const sourceMatch = [];
projectMatch.forEach(project => sourceMatch.push(
`${project}/src/**/*.{ts,tsx,scss,js,txt,html}`,
`!${project}/src/**/*.scss.ts`
));
let rushBuild = build.subTask('rushBuild', (gulp, options, done) => {
let child = exec(`rush build --to ${pkg.name} ${isProduction ? '--production' : ''}`);
child.stdout.on('data', data => process.stdout.write(data));
child.on('close', done);
});
let customWatch = build.subTask('customWatch', (gulp, options, done) => {
let gaze = require('gaze');
let isBuilding = false;
let buildEnqueued = false;
function startRun() {
if (!isBuilding) {
isBuilding = true;
buildEnqueued = false;
console.log('Starting build...');
rushBuild.execute(build.getConfig()).then(() => {
isBuilding = false;
// After build is complete, trigger reload.
build.reload.execute(build.getConfig());
// Configure TypeScript.
build.TypeScriptConfiguration.setTypescriptCompiler(require('typescript'));
// Use css modules.
build.sass.setConfig({
useCSSModules: true,
moduleExportName: ''
});
// Set up a "rushBuild" subTask that will spawn rush build
let fs = require('fs');
let spawn = require('child_process').spawn;
let rawStdout = new fs.SyncWriteStream(1, { autoClose: false });
let rushBuild = build.subTask('rushbuild', (gulp, options, done) => {
let child = spawn(
'rush',
['build', '--to', 'todo-app']
);
child.stdout.on('data', data => rawStdout.write(data));
child.on('close', done);
});
const sourceMatch = [
'src/**/*.{ts,tsx,scss,js,txt,html}',
'!src/**/*.scss.ts'
];
build.task('serve', serial(
build.serve,
const projectMatch = [
'apps/fabric-examples',
'packages/office-ui-fabric-react',
'packages/example-app-base',
'packages/utilities'
];
const sourceMatch = [];
projectMatch.forEach(project => sourceMatch.push(
`${project}/src/**/*.{ts,tsx,scss,js,txt,html}`,
`!${project}/src/**/*.scss.ts`
));
let rushBuild = build.subTask('rushBuild', (gulp, options, done) => {
let child = exec(`rush build --to ${pkg.name} ${isProduction ? '--production' : ''}`);
child.stdout.on('data', data => process.stdout.write(data));
child.on('close', done);
});
let customWatch = build.subTask('customWatch', (gulp, options, done) => {
let gaze = require('gaze');
let isBuilding = false;
let buildEnqueued = false;
function startRun() {
if (!isBuilding) {
isBuilding = true;
buildEnqueued = false;