Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.pipe(pipe.traceur())
.pipe(gulp.dest('compiled/example'));
});
gulp.task('build_dist', ['build_source_cjs', 'build_source_amd']);
gulp.task('build', ['build_dist', 'build_examples']);
// WATCH FILES FOR CHANGES
gulp.task('watch', function() {
gulp.watch(path.src, ['build']);
});
// WEB SERVER
gulp.task('serve', connect.server({
root: __dirname,
port: 8000,
open: {
browser: 'Google Chrome'
}
}));
// This is a super nasty, hacked release task.
// TODO(vojta): fix gulp-git and clean this up
var git = require('gulp-git');
var through = require('through2');
var exec = require('child_process').exec;
runSequence(
'clean',
['build_source_amd', 'build_source_cjs', 'build_source_es6', 'build_deps'],
done
);
});
// WATCH FILES FOR CHANGES
gulp.task('watch', ['build_source_amd'], function() {
gulp.watch([path.lib, path.util, path.example, path.exampleCopy, path.testLib, path.testExample], ['build_source_amd']);
});
// WEB SERVER
gulp.task('serve', connect.server({
root: [__dirname],
port: 8000,
livereload: false,
open: false
}));
var clientify = require('clientify');
var rename = function(search, replace) {
return through.obj(function(file, enc, done) {
file.path = file.path.replace(search, replace);
this.push(file);
done();
});
};
module.exports = function() {
var gulp = require('gulp');
var connect = require('gulp-connect');
gulp.task('connect', connect.server({
port: 1337,
livereload: false,
middleware: function(connect, options) {
return [
connect.static('./build'),
connect.static('./app')
]
}
}));
}
return new Promise(function(resolve, reject) {
serverInfo = connect.server({
name: 'Build A Banner Server',
port: 8889,
root: ['dev', '.temp'],
livereload: true,
});
resolve();
});
}
const startedPromise = new Promise(resolve => {
started = resolve;
});
setServeMode(modeOptions);
const options = {
name: 'AMP Dev Server',
root: process.cwd(),
host: argv.host || 'localhost',
port: argv.port || 8000,
https: argv.https,
preferHttp1: true,
silent: true,
middleware: getMiddleware,
...connectOptions,
};
connect.server(options, started);
await startedPromise;
url = `http${options.https ? 's' : ''}://${options.host}:${options.port}`;
log(green('Started'), cyan(options.name), green('at'), cyan(url));
logServeMode();
}
function serve(rootDir) {
connect.server({
root: rootDir
});
}
function serve() {
connect.server({
root: ['dist/'],
port: 9000,
livereload: true,
middleware: function (connect, opt) {
return [
proxy('/ihm-demo', {
target: 'http://localhost:8082',
changeOrigin: true
})
]
}
});
}
function startServer(port) {
var connect = require('gulp-connect');
connect.server({
root: '.',
port: port,
livereload: true
});
}
gulp.task('dev-server', function startServer() {
connect.server({
root: './dist',
livereload: true,
})
})