Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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');
}
});
});
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});
});
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']);
});
});
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) {