You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
1.9 KiB

9 years ago
9 years ago
  1. /*******************************
  2. Set-up
  3. *******************************/
  4. let
  5. gulp = require('gulp'),
  6. // read user config to know what task to load
  7. config = require('./tasks/config/user'),
  8. // watch for file changes and build
  9. watch = require('./tasks/watch'),
  10. // build all files
  11. build = require('./tasks/build'),
  12. buildJS = require('./tasks/build/javascript'),
  13. buildCSS = require('./tasks/build/css'),
  14. buildAssets = require('./tasks/build/assets'),
  15. // utility tasks
  16. clean = require('./tasks/clean'),
  17. version = require('./tasks/version'),
  18. // install tasks
  19. install = require('./tasks/install'),
  20. checkInstall = require('./tasks/check-install'),
  21. // docs tasks
  22. serveDocs = require('./tasks/docs/serve'),
  23. buildDocs = require('./tasks/docs/build'),
  24. // rtl
  25. buildRTL = require('./tasks/rtl/build'),
  26. watchRTL = require('./tasks/rtl/watch')
  27. ;
  28. /* Simple Compatibility Fix for Gulp 3 Style Tasks */
  29. gulp.start = function(name) {
  30. let task = gulp.task(name);
  31. if(task) {
  32. task();
  33. }
  34. }
  35. /*******************************
  36. Tasks
  37. *******************************/
  38. gulp.task('watch', watch);
  39. gulp.task('build', build);
  40. gulp.task('build-javascript', buildJS);
  41. gulp.task('build-css', buildCSS);
  42. gulp.task('build-assets', buildAssets);
  43. gulp.task('clean', clean);
  44. gulp.task('version', version);
  45. gulp.task('install', install);
  46. gulp.task('check-install', checkInstall);
  47. gulp.task('default', checkInstall);
  48. /*--------------
  49. Docs
  50. ---------------*/
  51. /*
  52. Lets you serve files to a local documentation instance
  53. https://github.com/Semantic-Org/Semantic-UI-Docs/
  54. */
  55. gulp.task('serve-docs', serveDocs);
  56. gulp.task('build-docs', buildDocs);
  57. /*--------------
  58. RTL
  59. ---------------*/
  60. if(config.rtl) {
  61. gulp.task('watch-rtl', watchRTL);
  62. gulp.task('build-rtl', buildRTL);
  63. }
  64. /* Admin Tasks */
  65. if(config.admin) {
  66. require('./tasks/collections/admin')(gulp);
  67. }