How to use the @microsoft/web-library-build.text 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-examples / gulpfile.js View on Github external
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');

  gulp.src('index.html')
    .pipe(prompt.prompt([{
      type: 'input',
      name: 'host',
      message: 'Please enter hostname (ftp.example.com)'
    },
    {
      type: 'input',
      name: 'user',
      message: 'Please enter username (exampleusername)'
    },