Skip to content

Instantly share code, notes, and snippets.

@stewones
Last active August 29, 2015 14:17
Show Gist options
  • Save stewones/69905e669d2eb4daa8b9 to your computer and use it in GitHub Desktop.
Save stewones/69905e669d2eb4daa8b9 to your computer and use it in GitHub Desktop.
simple gulp task for angular seo static servers
var gulp = require('gulp');
//especificando grupo de tarefas
gulp.task('crawl-serve', ['crawl-page1','crawl-page2']);
//definindo as tarefas
//a array do segundo parametro é opcional, serve pra especificar após quais tarefas esta tarefa deverá rodar
//tarefa 1
gulp.task('crawl-page1', [], function() {
return gulp.src('/path_to_src/index.html')
.pipe(gulp.dest('/path_to_distribution/some_folder/some_another_folder'));
});
//tarefa 2
gulp.task('crawl-page2', [], function() {
return gulp.src('/path_to_src/**/*.html') //especificando varios niveis de diretórios e todos arquivos htmls
.pipe(gulp.dest('/path_to_distribution/some_folder/some_another_folder'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment