gulpfile.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. var gulp = require('../../index.js')(require('gulp'), {aliases: ['h', '?']});
  2. // --------------------------------------------------------------------------------------
  3. // tasks
  4. // --------------------------------------------------------------------------------------
  5. gulp.task('build', 'build assets.', ['sass', 'uglify'], function () {
  6. console.log('building...');
  7. }, {
  8. options: {
  9. 'dev': 'Set build type to DEV',
  10. 'ist': 'Set build type to IST',
  11. 'qa': 'Set build type to QA'
  12. },
  13. aliases: ['b']
  14. });
  15. gulp.task('sass', 'Compile sass files', function () {
  16. console.log('sassing...');
  17. });
  18. gulp.task('uglify', 'Uglify js files', function () {
  19. console.log('uglifying...');
  20. });
  21. gulp.task('lint', 'Lints all server side js', function () {
  22. console.log('linting...');
  23. });
  24. gulp.task('ci', 'Run all CI verification', ['lint']); // TODO support this here: {aliases: ['continuous', 'CI']}
  25. // Separate task so "watch" can easily be overridden.
  26. gulp.task('ci-watch', false, function () {
  27. gulp.watch('./lib/**/*.js', ['lint']);
  28. });
  29. gulp.task('watch', 'Watch files and run ci validation on change', ['ci-watch']);
  30. gulp.task('combo', ['ci']);
  31. gulp.task('a-super-long-task-name', ['build']);
  32. gulp.task('a-super-long-task-name-that-is-ignored-and-not-counted-for-margins', false, ['build']);
  33. gulp.task('a-super-long-task-name-2', 'testing', ['build'], function () {
  34. }, {
  35. options: {
  36. 'a-super-long-options-name-to-test-margin': 'cool description bro, now make me a sammich'
  37. }
  38. });
  39. gulp.task('version', 'prints the version.', [], function () {
  40. // ...
  41. }, {
  42. options: {
  43. 'env=prod': 'description of env, perhaps with available values',
  44. 'key=val': 'description of key & val'
  45. }
  46. });
  47. gulp.task('do-things', function () {
  48. console.log('did things');
  49. }, {aliases: ['things', 'the-things']});
  50. gulp.task('i-will-overwrite-the-message', 'ERROR: message not overwritten');
  51. gulp.task('i-will-overwrite-the-message', 'success! message overwritten');
  52. gulp.task('THIS-TASK-SHOULD-NOT-BE-DISPLAYED', function () {}); // perhaps comes from separate library
  53. gulp.task('THIS-TASK-SHOULD-NOT-BE-DISPLAYED', false, function () {});
  54. gulp.task('empty-task', function () {});