How to use the @microsoft/web-library-build.serve 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
}
  };

  // Start watch at root of repo.
  let rootPath = path.resolve(__dirname, '../..');
  console.log(`Starting watch in ${rootPath}`);
  gaze(sourceMatch, { cwd: rootPath }, function () {
    this.on('all', startRun);
  });
});

build.task('w', customWatch);

build.task('serve', serial(
  rushBuild,
  build.serve,
  customWatch
));

// Shortcuts for individual subtasks.
build.task('webpack', build.webpack);
build.task('tslint', build.tslint);
build.task('ts', build.typescript);

// initialize tasks.
build.initialize(gulp);
github OfficeDev / office-ui-fabric-react / apps / todo-app / gulpfile.js View on Github external
let child = spawn(
    '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'));