How to use the @microsoft/web-library-build.TypeScriptConfiguration function in @microsoft/web-library-build

To help you get started, we’ve selected a few @microsoft/web-library-build examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OfficeDev / office-ui-fabric-react / apps / fabric-website / gulpfile.js View on Github external
// 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({
  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.
github OfficeDev / office-ui-fabric-react / apps / todo-app / gulpfile.js View on Github external
'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']