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.

80 lines
2.2 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. buildJS = require('./tasks/build/javascript'),
  11. buildCSS = require('./tasks/build/css'),
  12. buildAssets = require('./tasks/build/assets'),
  13. clean = require('./tasks/clean'),
  14. version = require('./tasks/version'),
  15. watch = require('./tasks/watch'),
  16. // install tasks
  17. install = require('./tasks/install'),
  18. checkInstall = require('./tasks/check-install'),
  19. // docs tasks
  20. serveDocs = require('./tasks/docs/serve'),
  21. buildDocs = require('./tasks/docs/build'),
  22. // rtl
  23. buildRTL = require('./tasks/rtl/build'),
  24. watchRTL = require('./tasks/rtl/watch')
  25. ;
  26. /*******************************
  27. Tasks
  28. *******************************/
  29. gulp.task('default', false, [
  30. 'check-install'
  31. ]);
  32. gulp.task('watch', 'Watch for site/theme changes', watch);
  33. gulp.task('build', 'Builds all files from source', build);
  34. gulp.task('build-javascript', 'Builds all javascript from source', buildJS);
  35. gulp.task('build-css', 'Builds all css from source', buildCSS);
  36. gulp.task('build-assets', 'Copies all assets from source', buildAssets);
  37. gulp.task('clean', 'Clean dist folder', clean);
  38. gulp.task('version', 'Displays current version of Semantic', version);
  39. gulp.task('install', 'Runs set-up', install);
  40. gulp.task('check-install', 'Displays current version of Semantic', checkInstall);
  41. /*--------------
  42. Docs
  43. ---------------*/
  44. /*
  45. Lets you serve files to a local documentation instance
  46. https://github.com/Semantic-Org/Semantic-UI-Docs/
  47. */
  48. gulp.task('serve-docs', 'Serve file changes to SUI Docs', serveDocs);
  49. gulp.task('build-docs', 'Build all files and add to SUI Docs', buildDocs);
  50. /*--------------
  51. RTL
  52. ---------------*/
  53. if(config.rtl) {
  54. gulp.task('watch-rtl', 'Build all files as RTL', watchRTL);
  55. gulp.task('build-rtl', 'Watch files as RTL ', buildRTL);
  56. }
  57. /* Admin Tasks */
  58. if(config.admin) {
  59. require('./tasks/collections/admin')(gulp);
  60. }