How to use the harp.server function in harp

To help you get started, we’ve selected a few harp 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 ksoichiro / Android-ObservableScrollView / website / gulpfile.js View on Github external
gulp.task('start', ['copy'], function() {
    // This task is for development locally, so BASE_URL should be empty.
    // $BASE_URL is referenced in harp.json, and it will be replaced by harp (envy).
    process.env.BASE_URL = ''
    harp.server(paths.harp.project, { port: port }, function(err) {
        if (err) {
            gutil.log('Failed to start');
            gutil.log(err);
        } else {
            gulp.watch([paths.docs + '/**/*', '!' + paths.docs + '/**/*.sw*'], ['copyDocs']);
            gulp.watch(paths.bower + '/**/*', ['copyBowerFiles']);
            gutil.log('Started server: http://localhost:' + port);
            gutil.log('Press Ctrl+C to quit');
        }
    });
});
github superhighfives / harp-gulp-browsersync-boilerplate / gulpfile.js View on Github external
gulp.task('serve', function () {
  harp.server(__dirname, {
    port: 9000
  }, function () {
    browserSync({
      proxy: "localhost:9000",
      open: false,
      /* Hide the notification. It gets annoying */
      notify: {
        styles: ['opacity: 0', 'position: absolute']
      }
    });
    /**
     * Watch for scss changes, tell BrowserSync to refresh main.css
     */
    gulp.watch(["*.css", "*.sass", "*.scss", "*.less"], function () {
      reload("main.css", {stream: true});
    });
github felipefialho / felipefialho.com / _harp / gulpfile.js View on Github external
gulp.task('serve', () => {

  harp.server(__dirname, {
    port: 9999
  }, function () {

    browserSync({
      proxy: 'localhost:9999'
    });

    gulp.watch(srcPaths.harp, function () { reload(); });

    gulp.watch(srcPaths.css, ['css']);
    gulp.watch(srcPaths.img, ['images']);
    gulp.watch(srcPaths.icons, ['icons']);

  });
});
github goinstant / goangular / gulpfile.js View on Github external
gulp.task('default', ['clean', 'develop'], function() {
  harp.server(__dirname, { port: 5000 });

  var options = {
    url: 'http://localhost:5000/examples/',
    app: 'Google Chrome'
  };

  gulp.src('./examples/index.html')
    .pipe(plugins.open('', options))
    .pipe(gulp.dest(pathTo.dist));

  gulp.watch(pathTo.watch).on('change', function() {
    gulp.start('develop');
  });

  var livereload = plugins.livereload();
  gulp.watch(pathTo.watchBuild).on('change', function(file) {

harp

Static Web Server/Generator/Bundler

MIT
Latest version published 2 years ago

Package Health Score

47 / 100
Full package analysis

Popular harp functions