Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
[path.join(distFolder, 'css')]: [
'node_modules/office-ui-fabric-core/dist/css/**/*.*'
]
}
});
// Produce AMD bits in lib-amd on production builds.
if (isProduction || isNuke) {
build.setConfig({
libAMDFolder: path.join(packageFolder, 'lib-amd')
});
}
// Short aliases for subtasks.
build.task('webpack', build.webpack);
build.task('tslint', build.tslint);
build.task('ts', build.typescript);
build.task('sass', build.sass);
// initialize tasks.
build.initialize(gulp);
gaze(sourceMatch, { cwd: rootPath }, function () {
this.on('all', startRun);
});
});
build.task('w', customWatch);
build.task('serve', serial(
rushBuild,
build.serve,
customWatch
));
// Shortcuts for individual subtasks.
build.task('webpack', build.webpack);
build.task('tslint', build.tslint);
build.task('ts', build.typescript);
// initialize tasks.
build.initialize(gulp);
'use strict';
let gulp = require('gulp');
let build = require('@microsoft/web-library-build');
build.task('tslint', build.tslint);
build.task('sass', build.sass);
build.task('karma', build.karma);
build.task('webpack', build.webpack);
// initialize tasks.
build.initialize(gulp);
// Always fail on test failures.
build.karma.setConfig({
failBuildOnErrors: true
});
// Copy fabric-core to dist to be published with fabric-react.
build.preCopy.setConfig({
shouldFlatten: false,
copyTo: {
[path.join(distFolder, 'sass')]: [
'node_modules/office-ui-fabric-core/dist/sass/**/*.*'
],
[path.join(distFolder, 'css')]: [
'node_modules/office-ui-fabric-core/dist/css/**/*.*'
]
}
});
// Short aliases for subtasks.
build.task('webpack', build.webpack);
build.task('tslint', build.tslint);
build.task('ts', build.typescript);
build.task('sass', build.serial(build.preCopy, build.sass));
build.task('karma', build.karma);
build.task('test', serial(build.sass, build.typescript, build.karma));
// build.task('visualtest', serial(build.sass, build.typescript, build.webpack, visualTestClean, visualTest));
// initialize tasks.
build.initialize(gulp);
// Configure TypeScript.
build.TypeScriptConfiguration.setTypescriptCompiler(require('typescript'));
// Use css modules.
build.sass.setConfig({
useCSSModules: true,
moduleExportName: ''
});
// Use Karma Tests - Disable during develoment if prefered
build.karma.isEnabled = () => false;
// Disable unnecessary subtasks.
build.preCopy.isEnabled = () => false;
// Disable tslint
build.tslint.isEnabled = () => false;
// Only run bundling in production builds; this speeds up normal ci builds.
build.webpack.isEnabled = () => isProduction;
// Copy fabric-core to dist to be published with fabric-react.
build.postCopy.setConfig({
shouldFlatten: false,
copyTo: {
[path.join(distFolder, 'sass')]: [
'node_modules/office-ui-fabric-core/dist/sass/**/*.*'
],
[path.join(distFolder, 'css')]: [
'node_modules/office-ui-fabric-core/dist/css/**/*.*'
]
}
});
let build = require('@microsoft/web-library-build');
let gulp = require('gulp');
/* Disable the gcb-webpack build, since we don't need to produce a bundle. */
build.webpack.isEnabled = () => false;
// Configure custom lint overrides.
let rules = Object.assign(
{},
require('./node_modules/@microsoft/gulp-core-build-typescript/lib/defaultTslint.json').rules,
require('./node_modules/office-ui-fabric-react-tslint/tslint.json').rules,
require('./tslint.json').rules
);
build.tslint.setConfig({
lintConfig: { rules },
displayAsWarning: false
});
// Use css modules.
build.sass.setConfig({
useCSSModules: true,
moduleExportName: ''
});
// Custom build steps.
build.task('tslint', build.tslint);
build.initialize(gulp);
'use strict';
let build = require('@microsoft/web-library-build');
let gulp = require('gulp');
// Short aliases for subtasks.
build.task('webpack', build.webpack);
build.task('sass', build.sass);
build.task('karma', build.karma);
build.task('ts', build.typescript);
build.task('tslist', build.tslint);
// initialize tasks.
build.initialize(gulp);
// Always fail on test failures.
build.karma.setConfig({
failBuildOnErrors: true
});
// Use css modules.
build.sass.setConfig({
useCSSModules: true,
moduleExportName: ''
});
'use strict';
let build = require('@microsoft/web-library-build');
let serial = build.serial;
build.tslint.isEnabled = () => false;
build.karma.isEnabled = () => false;
// 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 });
require('./node_modules/office-ui-fabric-react-tslint/tslint.json').rules,
require('./tslint.json').rules
);
build.tslint.setConfig({
lintConfig: { rules },
displayAsWarning: false
});
// Use css modules.
build.sass.setConfig({
useCSSModules: true,
moduleExportName: ''
});
// Custom build steps.
build.task('tslint', build.tslint);
build.initialize(gulp);
let gulp = require('gulp');
let configFile = "./ftpconfig.json";
let fs = require('fs');
let path = require('path');
let pkg = require('./package.json');
let isProduction = process.argv.indexOf('--production') >= 0;
let isNuke = process.argv.indexOf('nuke') >= 0;
// Configur custom lint rules.
let rules = Object.assign(
{},
require('./node_modules/@microsoft/gulp-core-build-typescript/lib/defaultTslint.json').rules,
require('../../tslint.json').rules,
require('./tslint.json').rules
);
build.tslint.setConfig({ lintConfig: { rules } });
// Configure TypeScript 2.0.
build.typescript.setConfig({ typescript: require('typescript') });
// Disable karma unit tests.
build.karma.isEnabled = () => false;
let packageFolder = buildConfig.packageFolder || '';
let distFolder = buildConfig.distFolder;
build.postCopy.setConfig({
copyTo: {
[distFolder]: [
'src/**/*.png',
'node_modules/react/dist/react.js',
'node_modules/react-dom/dist/react-dom.js'