This repository has been archived on 2024-01-26. You can view files and clone it, but cannot push or open issues or pull requests.
calcifer/web/semantic/tasks/config/npm/gulpfile.js

72 lines
1.9 KiB
JavaScript
Raw Normal View History

2015-03-29 19:33:23 +02:00
/*******************************
Set-up
*******************************/
var
2016-06-10 00:34:34 +02:00
gulp = require('gulp-help')(require('gulp')),
2015-03-29 19:33:23 +02:00
// read user config to know what task to load
2016-06-10 00:34:34 +02:00
config = require('./tasks/config/user'),
2015-03-29 19:33:23 +02:00
2016-06-10 00:34:34 +02:00
// watch changes
watch = require('./tasks/watch'),
// build all files
build = require('./tasks/build'),
buildJS = require('./tasks/build/javascript'),
buildCSS = require('./tasks/build/css'),
buildAssets = require('./tasks/build/assets'),
// utility
clean = require('./tasks/clean'),
version = require('./tasks/version'),
2015-03-29 19:33:23 +02:00
// docs tasks
2016-06-10 00:34:34 +02:00
serveDocs = require('./tasks/docs/serve'),
buildDocs = require('./tasks/docs/build'),
2015-03-29 19:33:23 +02:00
// rtl
2016-06-10 00:34:34 +02:00
buildRTL = require('./tasks/rtl/build'),
watchRTL = require('./tasks/rtl/watch')
2015-03-29 19:33:23 +02:00
;
2016-06-10 00:34:34 +02:00
/*******************************
Tasks
*******************************/
2015-03-29 19:33:23 +02:00
gulp.task('default', false, [
'watch'
]);
gulp.task('watch', 'Watch for site/theme changes', watch);
2016-06-10 00:34:34 +02:00
2015-03-29 19:33:23 +02:00
gulp.task('build', 'Builds all files from source', build);
2016-06-10 00:34:34 +02:00
gulp.task('build-javascript', 'Builds all javascript from source', buildJS);
gulp.task('build-css', 'Builds all css from source', buildCSS);
gulp.task('build-assets', 'Copies all assets from source', buildAssets);
2015-03-29 19:33:23 +02:00
gulp.task('clean', 'Clean dist folder', clean);
gulp.task('version', 'Displays current version of Semantic', version);
/*--------------
Docs
---------------*/
/*
2016-06-10 00:34:34 +02:00
Lets you serve files to a local documentation instance
2015-03-29 19:33:23 +02:00
https://github.com/Semantic-Org/Semantic-UI-Docs/
*/
gulp.task('serve-docs', 'Serve file changes to SUI Docs', serveDocs);
gulp.task('build-docs', 'Build all files and add to SUI Docs', buildDocs);
2016-06-10 00:34:34 +02:00
2015-03-29 19:33:23 +02:00
/*--------------
RTL
---------------*/
if(config.rtl) {
gulp.task('watch-rtl', 'Build all files as RTL', watchRTL);
gulp.task('build-rtl', 'Watch files as RTL ', buildRTL);
2016-06-10 00:34:34 +02:00
}