Skip to content
This repository has been archived by the owner on Oct 18, 2019. It is now read-only.

Commit

Permalink
match tasks config npm gulpfile to main one
Browse files Browse the repository at this point in the history
  • Loading branch information
acconrad committed Nov 11, 2018
1 parent dedde24 commit 624ed30
Showing 1 changed file with 71 additions and 19 deletions.
90 changes: 71 additions & 19 deletions tasks/config/npm/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var
// read user config to know what task to load
config = require('./tasks/config/user'),

// watch changes
// watch for file changes and build
watch = require('./tasks/watch'),

// build all files
Expand All @@ -17,10 +17,14 @@ var
buildCSS = require('./tasks/build/css'),
buildAssets = require('./tasks/build/assets'),

// utility
// utility tasks
clean = require('./tasks/clean'),
version = require('./tasks/version'),

// install tasks
install = require('./tasks/install'),
checkInstall = require('./tasks/check-install'),

// docs tasks
serveDocs = require('./tasks/docs/serve'),
buildDocs = require('./tasks/docs/build'),
Expand All @@ -35,19 +39,50 @@ var
Tasks
*******************************/

gulp.task('default', false, [
'watch'
]);

gulp.task('watch', 'Watch for site/theme changes', watch);

gulp.task('build', 'Builds all files from source', build);
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);

gulp.task('clean', 'Clean dist folder', clean);
gulp.task('version', 'Displays current version of Semantic', version);
gulp.task('default', function(done) {
checkInstall();
done();
});

gulp.task('watch', function(done) {
watch();
done();
});

gulp.task('build', function(done) {
build();
done();
});
gulp.task('build-javascript', function(done) {
buildJS();
done();
});
gulp.task('build-css', function(done) {
buildCSS();
done();
});
gulp.task('build-assets', function(done) {
buildAssets();
done();
});

gulp.task('clean', function(done) {
clean();
done();
});
gulp.task('version', function(done) {
version();
done();
});

gulp.task('install', function(done) {
install();
done();
});
gulp.task('check-install', function(done) {
checkInstall();
done();
});

/*--------------
Docs
Expand All @@ -58,15 +93,32 @@ gulp.task('version', 'Displays current version of Semantic', version);
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);
gulp.task('serve-docs', function(done) {
serveDocs();
done();
});
gulp.task('build-docs', function(done) {
buildDocs();
done();
});


/*--------------
RTL
---------------*/

if(config.rtl) {
gulp.task('watch-rtl', 'Watch files as RTL', watchRTL);
gulp.task('build-rtl', 'Build all files as RTL', buildRTL);
gulp.task('watch-rtl', function(done) {
watchRTL();
done();
});
gulp.task('build-rtl', function(done) {
buildRTL();
done();
});
}

/* Admin Tasks */
if(config.admin) {
require('./tasks/collections/admin')(gulp);
}

0 comments on commit 624ed30

Please sign in to comment.