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.9 KiB

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