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('docs', ['docs:generate'], function() {
browserSync.use(browserSyncSpa({
selector: '[ng-app]' // Only needed for angular apps
}));
browserSync.instance = browserSync.init({
startPath: '/',
server: {
baseDir: './' + conf.paths.docs
},
port: 3010,
browser: 'default'
});
gulp.watch(path.join(conf.paths.src, '/**/*.js'), function(event) {
gulp.start('docs:generate');
browserSync.reload(event.path);
});
});
* You can add a proxy to your backend by uncommenting the line below.
* You just have to configure a context which will we redirected and the target url.
* Example: $http.get('/users') requests will be automatically proxified.
*
* For more details and option, https://github.com/chimurai/http-proxy-middleware/blob/v0.9.0/README.md
*/
// server.middleware = proxyMiddleware('/users', {target: 'http://jsonplaceholder.typicode.com', changeOrigin: true});
browserSync.instance = browserSync.init({
startPath: '/',
server: server,
browser: browser
});
}
browserSync.use(browserSyncSpa({
selector: '[ng-app]'// Only needed for angular apps
}));
gulp.task('serve', ['watch','seed'], function () {
browserSyncInit([path.join(conf.paths.tmp, '/serve'), conf.paths.src]);
});
gulp.task('serve:dist', ['build'], function () {
browserSyncInit(conf.paths.dist);
});
gulp.task('serve:e2e', ['inject','seed'], function () {
browserSyncInit([conf.paths.tmp + '/serve', conf.paths.src], []);
});
gulp.task('serve:e2e-dist', ['build','seed:e2e-dist'], function () {
* For more details and option, https://github.com/chimurai/http-proxy-middleware/blob/v0.0.5/README.md
*/
server.middleware = [
proxyMiddleware('/my-context/api', {
target: 'http://localhost:10000'
})
];
browserSync.instance = browserSync.init({
startPath: '/my-context/',
server: server,
browser: browser
});
}
browserSync.use(browserSyncSpa({
selector: '[ng-app]'// Only needed for angular apps
}));
gulp.task('serve', ['watch'], function () {
browserSyncInit([path.join(conf.paths.tmp, '/serve'), conf.paths.src]);
});
gulp.task('serve:dist', ['build'], function () {
browserSyncInit(conf.paths.dist);
});
gulp.task('serve:e2e', ['inject'], function () {
browserSyncInit([conf.paths.tmp + '/serve', conf.paths.src], []);
});
gulp.task('serve:e2e-dist', ['build'], function () {
* You can add a proxy to your backend by uncommenting the line below.
* You just have to configure a context which will we redirected and the target url.
* Example: $http.get('/users') requests will be automatically proxified.
*
* For more details and option, https://github.com/chimurai/http-proxy-middleware/blob/v0.9.0/README.md
*/
// server.middleware = proxyMiddleware('/users', {target: 'http://jsonplaceholder.typicode.com', changeOrigin: true});
browserSync.instance = browserSync.init({
startPath: '/',
server: server,
browser: browser
});
}
browserSync.use(browserSyncSpa({
selector: '[ng-app]'// Only needed for angular apps
}));
gulp.task('serve', ['watch'], function () {
browserSyncInit([path.join(conf.paths.tmp, '/serve'), conf.paths.src, '.']);
});
gulp.task('serve:dist', ['build'], function () {
browserSyncInit(conf.paths.dist);
});
gulp.task('serve:e2e', ['inject'], function () {
browserSyncInit([conf.paths.tmp + '/serve', conf.paths.src], []);
});
gulp.task('serve:e2e-dist', ['build'], function () {
* You just have to configure a context which will we redirected and the target url.
* Example: $http.get('/users') requests will be automatically proxified.
*
* For more details and option, https://github.com/chimurai/http-proxy-middleware/blob/v0.0.5/README.md
*/
// server.middleware = proxyMiddleware('/users', {target: 'http://jsonplaceholder.typicode.com', proxyHost: 'jsonplaceholder.typicode.com'});
browserSync.instance = browserSync.init({
startPath: '/',
port: 5000,
server: server,
browser: browser
});
}
browserSync.use(browserSyncSpa({
selector: '[ng-app]'// Only needed for angular apps
}));
gulp.task('serve', ['watch'], function() {
browserSyncInit([path.join(conf.paths.tmp, '/serve'), conf.paths.src]);
});
gulp.task('serve:dist', ['build:demo'], function() {
browserSyncInit(conf.paths.dist.demo);
});
gulp.task('serve:e2e', ['inject'], function() {
browserSyncInit([conf.paths.tmp + '/serve', conf.paths.src], []);
});
gulp.task('serve:e2e-dist', ['build:lib'], function() {
var server = {
baseDir: baseDir,
routes: routes
};
browserSync.instance = browserSync.init({
startPath: '/',
server: server,
browser: 'default',
ghostMode: false,
notify: false
});
}
browserSync.use(browserSyncSpa({
selector: '[ng-app]'// Only needed for angular apps
}));
gulp.task('server', function () {
browserSyncInit([conf.paths.serve, conf.paths.src]);
});
gulp.task('server-build', function () {
browserSyncInit(conf.paths.dist);
});
gulp.task('serve', gulp.series('inject', 'watch', 'server'));
gulp.task('serve:dist', gulp.series('build', 'server-build'));
gulp.task("serve", function () {
browserSync.use(htmlInjector);
browserSync({
open: false,
logLevel: "silent",
server: {
baseDir: "_site",
routes: {
"/img": "./img",
"/css": "test/fixtures/css"
}
}
}, function (err, bs) {
site.logger.info("View your website at: {yellow:%s}", bs.getOptionIn(["urls", "local"]));
if (bs.getOptionIn(["urls", "external"])) {
site.logger.info("View your website at: {yellow:%s}", bs.getOptionIn(["urls", "external"]));
}
});