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.

84 lines
2.2 KiB

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