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.

50 lines
1016 B

  1. /*******************************
  2. Build Task
  3. *******************************/
  4. var
  5. // dependencies
  6. gulp = require('gulp-help')(require('gulp')),
  7. runSequence = require('run-sequence'),
  8. // config
  9. config = require('./config/user'),
  10. install = require('./config/project/install'),
  11. // task sequence
  12. tasks = []
  13. ;
  14. // sub-tasks
  15. if(config.rtl) {
  16. require('./collections/rtl')(gulp);
  17. }
  18. require('./collections/build')(gulp);
  19. module.exports = function(callback) {
  20. console.info('Building Semantic');
  21. if( !install.isSetup() ) {
  22. console.error('Cannot find semantic.json. Run "gulp install" to set-up Semantic');
  23. return 1;
  24. }
  25. // check for right-to-left (RTL) language
  26. if(config.rtl === true || config.rtl === 'Yes') {
  27. gulp.start('build-rtl');
  28. return;
  29. }
  30. if(config.rtl == 'both') {
  31. tasks.push('build-rtl');
  32. }
  33. tasks.push('build-javascript');
  34. tasks.push('build-css');
  35. tasks.push('build-assets');
  36. runSequence(tasks, callback);
  37. };