gulpfile.js 964 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. 'use strict';
  2. var gulp = require('gulp');
  3. var path = require('path');
  4. var config = require('ng-factory').use(gulp, {
  5. cdn: true,
  6. src: {
  7. docsViews: '*/docs/{,*/}*.tpl.{html,jade}'
  8. },
  9. bower: {
  10. exclude: /jquery|js\/bootstrap|\.less/
  11. }
  12. });
  13. config.dirname = __dirname;
  14. //
  15. // Tasks
  16. gulp.task('serve', gulp.series('ng:serve'));
  17. require('./tasks/compat')(gulp, config);
  18. var del = require('del');
  19. gulp.task('build', gulp.series('ng:build', 'compat', function afterBuild() {
  20. var paths = config.paths;
  21. // Delete useless module.* build files
  22. return del(path.join(paths.dest, 'module.*'));
  23. }));
  24. gulp.task('pages', gulp.series('ng:pages', function afterPages(done) {
  25. var paths = config.docs;
  26. return gulp.src([
  27. 'bower_components/highlightjs/styles/github.css',
  28. '1.0/**/*'
  29. ],
  30. {cwd: paths.cwd, base: paths.cwd})
  31. .pipe(gulp.dest(paths.dest));
  32. }));
  33. require('./tasks/test')(gulp, config);
  34. gulp.task('default', gulp.task('build'));