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.

72 lines
1.8 KiB

  1. /*******************************
  2. Set-up
  3. *******************************/
  4. var
  5. gulp = require('gulp-help')(require('gulp')),
  6. // read user config to know what task to load
  7. config = require('./tasks/config/user'),
  8. // import tasks
  9. build = require('./tasks/build'),
  10. clean = require('./tasks/clean'),
  11. version = require('./tasks/version'),
  12. watch = require('./tasks/watch'),
  13. // install tasks
  14. install = require('./tasks/install'),
  15. checkInstall = require('./tasks/check-install'),
  16. // docs tasks
  17. serveDocs = require('./tasks/docs/serve'),
  18. buildDocs = require('./tasks/docs/build'),
  19. // rtl
  20. buildRTL = require('./tasks/rtl/build'),
  21. watchRTL = require('./tasks/rtl/watch')
  22. ;
  23. /*******************************
  24. Tasks
  25. *******************************/
  26. gulp.task('default', false, [
  27. 'check-install'
  28. ]);
  29. gulp.task('watch', 'Watch for site/theme changes', watch);
  30. gulp.task('build', 'Builds all files from source', build);
  31. gulp.task('clean', 'Clean dist folder', clean);
  32. gulp.task('version', 'Displays current version of Semantic', version);
  33. gulp.task('install', 'Runs set-up', install);
  34. gulp.task('check-install', 'Displays current version of Semantic', checkInstall);
  35. /*--------------
  36. Docs
  37. ---------------*/
  38. /*
  39. Lets you serve files to a local documentation instance
  40. https://github.com/Semantic-Org/Semantic-UI-Docs/
  41. */
  42. gulp.task('serve-docs', 'Serve file changes to SUI Docs', serveDocs);
  43. gulp.task('build-docs', 'Build all files and add to SUI Docs', buildDocs);
  44. /*--------------
  45. RTL
  46. ---------------*/
  47. if(config.rtl) {
  48. gulp.task('watch-rtl', 'Build all files as RTL', watchRTL);
  49. gulp.task('build-rtl', 'Watch files as RTL ', buildRTL);
  50. }
  51. /* Admin Tasks */
  52. if(config.admin) {
  53. require('./tasks/collections/admin')(gulp);
  54. }