This is just the simple, but highly effective, task to use Jekyll without having to be chained to how its development server, preprocessing, and so on.
gulp
npm install gulp --save-dev
yargs
npm install yargs --save-dev
The DEPLOY
constant is used with yargs
to allow the use of a --production
flag on the default gulp task. If the flag is used, then DEPLOY
is true
. This allows all kinds of conditional task actions in the gulpfile, but in this case, it allows leveraging Jekyll's own environment variable options. Using the child_process
module native to Node.js, this is all possible.
See the documentation on the module to learn more about the methods used in this task.