This repository has been archived by the owner on Apr 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
71 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,88 @@ | ||
'use strict'; | ||
var gulp = require('gulp'); | ||
var config = require('./gulp/config')(); | ||
var runSequence = require('run-sequence'); | ||
var t = require('./gulp/utils/tasksHelpers')(gulp); | ||
|
||
t.configure(config); | ||
|
||
////////// | ||
// Main // | ||
////////// | ||
gulp.task('default', | ||
'Build and serve the app', | ||
['serve', 'tasks']); | ||
/////////////// | ||
// Build // | ||
/////////////// | ||
|
||
gulp.task('build', | ||
'Build the app', | ||
function(cb) { | ||
runSequence('clean', | ||
['build:pages', 'build:assets', 'build:styles', 'build:scripts'], | ||
cb); | ||
}); | ||
// Cleans the build folder | ||
gulp.task('clean', t.getTask('clean')); | ||
|
||
gulp.task('serve', | ||
'Serve the build folder', | ||
['build'], | ||
t.getTask('serve')); | ||
// Moves all the assets to the build | ||
gulp.task('build:assets', t.getTask('assets')); | ||
|
||
gulp.task('deploy', | ||
'Deploys to testing', | ||
t.getTask('deploy')); | ||
// Concatenates all the content files | ||
gulp.task('build:content', t.getTask('content')); | ||
|
||
// Generate all pages from the jade files | ||
gulp.task('build:pages', t.getTask('pages')); | ||
|
||
gulp.task('test', | ||
'Tests the built project in terms of accessibility.', | ||
['test:accessibility']); | ||
// Generate all stylesheets from the sass files | ||
gulp.task('build:styles', t.getTask('styles')); | ||
|
||
// Move all javscript files to the build | ||
gulp.task('build:scripts', t.getTask('scripts')); | ||
|
||
gulp.task( | ||
'build', | ||
gulp.series( | ||
'clean', | ||
gulp.parallel( | ||
gulp.series( | ||
'build:content', | ||
'build:pages' | ||
), | ||
'build:assets', | ||
'build:styles', | ||
'build:scripts' | ||
) | ||
) | ||
); | ||
|
||
/////////////// | ||
// Secondary // | ||
/////////////// | ||
|
||
// Move all javscript files to the build | ||
gulp.task('build:scripts', | ||
false, | ||
t.getTask('scripts')); | ||
////////// | ||
// Test // | ||
////////// | ||
|
||
// Generate all stylesheets from the sass files | ||
gulp.task('build:styles', | ||
false, | ||
t.getTask('styles')); | ||
// Moves all the assets to the build | ||
gulp.task('test:accessibility', t.getTask('accessibility')); | ||
|
||
// Concatenates all the content files | ||
gulp.task('build:content', | ||
false, | ||
t.getTask('content')); | ||
// Tests the built project in terms of accessibility. | ||
gulp.task( | ||
'test', | ||
gulp.series( | ||
'build', | ||
'test:accessibility' | ||
) | ||
); | ||
|
||
// Generate all pages from the jade files | ||
gulp.task('build:pages', | ||
false, | ||
['build:content'], | ||
t.getTask('pages')); | ||
|
||
// Moves all the assets to the build | ||
gulp.task('build:assets', | ||
false, | ||
t.getTask('assets')); | ||
//////////// | ||
// Deploy // | ||
//////////// | ||
|
||
gulp.task('deploy', t.getTask('deploy')); | ||
|
||
// Moves all the assets to the build | ||
gulp.task('test:accessibility', | ||
false, | ||
['build'], | ||
t.getTask('accessibility')); | ||
|
||
// Cleans the build folder | ||
gulp.task('clean', | ||
false, | ||
t.getTask('clean')); | ||
///////////// | ||
// Others // | ||
///////////// | ||
|
||
// Serve the build folder | ||
gulp.task('serve', t.getTask('serve')); | ||
|
||
// Lints the gulp tasks | ||
gulp.task('tasks', | ||
false, | ||
t.getTask('tasks')); | ||
gulp.task('tasks', t.getTask('tasks')); | ||
|
||
// What happens when just running 'gulp' | ||
gulp.task( | ||
'default', | ||
gulp.series( | ||
'build', | ||
'serve' | ||
) | ||
); |