Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
require('./tslint.json').rules
);
// 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/**/*.*'
// });
// Always fail on test failures.
build.karma.setConfig({
failBuildOnErrors: true
});
// Use css modules.
build.sass.setConfig({
useCSSModules: true,
moduleExportName: ''
});
// 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));
'use strict';
let path = require('path');
let build = require('@microsoft/web-library-build');
build.sass.setConfig({ useCSSModules: true });
build.webpack.setConfig({ configPath: null });
build.setConfig({
libAMDFolder: path.join(build.getConfig().packageFolder, 'lib-amd'),
libES6Folder: path.join(build.getConfig().packageFolder, 'lib-es6')
});
build.preCopy.cleanMatch = ['src/preCopyTest.ts'];
build.initialize(require('gulp'));