INNER CODE UNIT · JavaScript
buildTask
danmindru/responsive-html-email-signature · tasks/build.js:11
function buildTask(options) {
// Requires: 'dupe', 'less', 'sass', 'postcss', 'lint'.
gulp.task('build', function build(done) {
/**
* Makes templates for a given directory & its configurations.
*
* @function makeTemplates
* @param {String} dir Directory to make templates from.
* @param {Array} confItems A list of configurations objects (usually persons) to make templates from.
*/
function makeTemplates(dir, confItems) {
return confItems.map(async conf => {
const cwd = `${options.workingDir}/${dir}`;
/**
* Find stylesheets relative to the CWD & generate <link> tags.
* This way we can automagically inject them into <head>.
*/