Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
let gulp = require('gulp');
let build = require('@microsoft/web-library-build');
build.task('sass', build.sass);
build.task('karma', build.karma);
// 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 gulp = require('gulp');
let buildConfig = build.getConfig();
let distFolder = buildConfig.distFolder;
let path = require('path');
let packageFolder = buildConfig.packageFolder || '';
let isProduction = process.argv.indexOf('--production') >= 0;
let isNuke = process.argv.indexOf('nuke') >= 0;
// Use css modules and use export =
build.sass.setConfig({
useCSSModules: true,
moduleExportName: ''
});
// 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
);
// Configure TypeScript.
build.TypeScriptConfiguration.setTypescriptCompiler(require('typescript'));
// Use css modules.
build.sass.setConfig({
]
}
});
// 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);
// .pipe(casperJs(
// {
// screenshots: 'visualtests/baseline',
// comparisonResultRoot: 'visualtests/results'
// })).on('end', done);
// }
// });
// 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/**/*.*'
]
}
});
'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 });
let rushBuild = build.subTask('rushbuild', (gulp, options, done) => {
let child = spawn(
'rush',
['build', '--to', 'todo-app']
);
child.stdout.on('data', data => rawStdout.write(data));
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 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
});
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 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'));