How to use the @microsoft/web-library-build.watch 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 / todo-app / gulpfile.js View on Github external
'rush',
    ['build', '--to', 'todo-app']
  );

  child.stdout.on('data', data => rawStdout.write(data));
  child.on('close', done);
});

const sourceMatch = [
  'src/**/*.{ts,tsx,scss,js,txt,html}',
  '!src/**/*.scss.ts'
];

build.task('serve', serial(
  build.serve,
  build.watch(sourceMatch, serial(
    rushBuild,
    build.reload
  ))));

build.initialize(require('gulp'));