Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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'
]
}
});
// process *.Example.tsx as text for examples.
build.text.setConfig({ textMatch: ['src/**/*.Example.tsx'] });
/* Define deploy subtask */
gulp.task('install-deploy', function (cb) {
let prompt = require('gulp-prompt');
});
// 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/**/*.*'
]
}
});
// Produce AMD bits in lib-amd on production builds.
if (isProduction || isNuke) {
build.setConfig({
libAMDFolder: path.join(packageFolder, 'lib-amd')
});