Site JS is now compiled inside of content. No more gulp streams.

This commit is contained in:
Jocelyn Badgley (Twipped) 2020-02-28 10:27:52 -08:00
parent 695637c3e7
commit 823f662743
13 changed files with 105 additions and 633 deletions

View File

@ -12,6 +12,8 @@ const { resolve } = require('./resolve');
const favicon = require('./favicon'); const favicon = require('./favicon');
const scss = require('./scss'); const scss = require('./scss');
const svg = require('./svg'); const svg = require('./svg');
const scripts = require('./scripts');
exports.everything = function (prod = false) { exports.everything = function (prod = false) {
const fn = async () => { const fn = async () => {
@ -30,23 +32,20 @@ exports.everything = function (prod = false) {
const tasks = await Promise.all([ const tasks = await Promise.all([
PublicFiles.tasks, PublicFiles.tasks,
scss(prod), scss(prod),
scripts(prod),
svg(prod), svg(prod),
favicon(prod), favicon(prod),
]); ]);
async function crankTasks () { await fs.writeFile(resolve('pages.json'), JSON.stringify(pages.map((p) => p.toJson()), null, 2));
if (!tasks.length) return;
await fs.ensureDir(resolve('dist'));
const cache = new Cache({ prod }); const cache = new Cache({ prod });
await cache.load(); await cache.load();
await evaluate(tasks.flat(), cache); await evaluate(tasks.flat(), cache);
await cache.save(); await cache.save();
}
await Promise.all([ await pageWriter(pages, prod);
fs.writeFile(resolve('pages.json'), JSON.stringify(pages.map((p) => p.toJson()), null, 2)),
pageWriter(pages, prod),
crankTasks(),
]);
}; };
const ret = () => fn().catch((err) => { console.log(err.trace || err); throw err; }); const ret = () => fn().catch((err) => { console.log(err.trace || err); throw err; });

View File

@ -2,7 +2,7 @@
const path = require('path'); const path = require('path');
const ROOT = path.resolve(__dirname, '../..'); const ROOT = path.resolve(__dirname, '../..');
const fs = require('fs-extra'); const fs = require('fs-extra');
const { is: _is, re } = require('../lib/util'); const { is: _is } = require('../lib/util');
function is (...args) { function is (...args) {
const fn = _is(...args); const fn = _is(...args);
@ -135,10 +135,8 @@ exports.readFile = function readFile (fpath) {
exports.resolve = function resolve (...args) { exports.resolve = function resolve (...args) {
args = args.filter(Boolean); args = args.filter(Boolean);
let fpath = args.shift(); const fpath = args.shift();
if (!fpath) return ROOT; if (!fpath) return ROOT;
if (fpath[0] === '/') throw new Error('Did you mean to resolve this? ' + fpath);
// if (fpath[0] === '/') fpath = fpath.slice(1);
return path.resolve(ROOT, fpath, ...args); return path.resolve(ROOT, fpath, ...args);
}; };

75
gulp/content/scripts.js Normal file
View File

@ -0,0 +1,75 @@
const glob = require('../lib/glob');
const { ROOT, readFile } = require('./resolve');
const actions = require('./actions');
const File = require('./file');
const Promise = require('bluebird');
const { minify } = require('terser');
module.exports = exports = async function scripts (prod) {
const globalFiles = await glob('js/_*.js', { cwd: ROOT, nodir: true });
globalFiles.unshift(
require.resolve('jquery'),
require.resolve('magnific-popup'),
require.resolve('popper.js/dist/umd/popper.js'),
require.resolve('bootstrap/js/dist/util.js'),
require.resolve('bootstrap/js/dist/dropdown.js'),
);
const globalScript = new ClientScript('js/global.js');
await globalScript.concat(globalFiles, prod);
const files = await Promise.map(glob('js/*.js', { cwd: ROOT, nodir: true }), async (filepath) => {
const f = new ClientScript(filepath);
if (f.preprocessed) return false;
await f.load(prod);
return f;
}).filter(Boolean);
const tasks = files.map((f) => f.tasks()).flat();
tasks.push(...globalScript.tasks());
return tasks;
};
class ClientScript extends File {
_dir (dir) {
dir = dir.split('/');
return dir;
}
async load (prod) {
let contents = (await readFile(this.input).catch(() => '')).toString('utf8');
if (prod) {
const { code, error } = minify(contents);
if (error) throw new Error(error);
contents = code;
}
this.content = contents;
}
async concat (files, prod) {
let contents = await Promise.map(files, readFile);
contents = contents.join('\n\n');
if (prod) {
const { code, error } = minify(contents);
if (error) throw new Error(error);
contents = code;
}
this.content = contents;
}
tasks () {
return [ {
input: this.input,
output: this.out,
content: this.content,
action: actions.write,
nocache: true,
} ];
}
}

View File

@ -1,17 +1,12 @@
const { series, parallel, watch } = require('gulp'); const { series, watch } = require('gulp');
/** **************************************************************************************************************** **/ /** **************************************************************************************************************** **/
var content = require('./content'); var content = require('./content');
const everything = content.everything(); const devBuildTask = content.everything();
everything.prod = content.everything(true); const prodBuildTask = content.everything(true);
exports.go = series(everything);
var jsTask = require('./scripts');
exports.js = jsTask;
var cleanTask = require('./clean'); var cleanTask = require('./clean');
exports.clean = cleanTask; exports.clean = cleanTask;
@ -24,18 +19,8 @@ exports.cloudfront = cloudfront;
/** **************************************************************************************************************** **/ /** **************************************************************************************************************** **/
var prodBuildTask = parallel( exports.dev = series(devBuildTask);
jsTask.prod, exports.prod = series(prodBuildTask);
everything.prod,
);
var devBuildTask = parallel(
jsTask,
everything,
);
exports.dev = devBuildTask;
exports.prod = prodBuildTask;
exports.publish = series( exports.publish = series(
cleanTask, cleanTask,
prodBuildTask, prodBuildTask,
@ -52,14 +37,10 @@ function watcher () {
'public/**/*', 'public/**/*',
'templates/*.{md,hbs,html}', 'templates/*.{md,hbs,html}',
'scss/*.scss', 'scss/*.scss',
], everything); 'js/*.js',
], devBuildTask);
watch('js/*.js', jsTask); server();
var forever = require('forever');
var srv = new forever.Monitor('server.js');
srv.start();
forever.startServer(srv);
} }
function server () { function server () {
@ -71,7 +52,7 @@ function server () {
} }
exports.watch = series(everything, watcher); exports.watch = series(devBuildTask, watcher);
exports.uat = series(cleanTask, prodBuildTask, server); exports.uat = series(cleanTask, prodBuildTask, server);
/** **************************************************************************************************************** **/ /** **************************************************************************************************************** **/

View File

@ -1,31 +0,0 @@
const through = require('./through');
const crass = require('crass');
const PluginError = require('plugin-error');
module.exports = exports = function (options) {
options = {
pretty: false,
o1: true,
...options,
};
return through(async (stream, file) => {
if (file.isNull()) {
stream.push(file);
return;
}
try {
var parsed = crass.parse(file.contents.toString());
parsed = parsed.optimize({ O1: !!options.o1 });
if (options.pretty) parsed = parsed.pretty();
file.contents = Buffer.from(parsed.toString());
} catch (err) {
this.emit('error', new PluginError('gulp-crass', err));
}
stream.push(file);
});
};

View File

@ -1,32 +0,0 @@
const through = require('./through');
const log = require('fancy-log');
const { get } = require('lodash');
module.exports = exports = function debug (...targets) {
return through(async (stream, file) => {
var data;
const { path, relative, base, basename, extname } = file;
if (targets.length === 1 && Array.isArray(targets[0])) {
targets = targets[0];
}
if (targets.length) {
data = targets.reduce((result, target) => {
if (target === 'contents') {
result.contents = file.contents.toString();
return result;
}
result[target] = get(file, target);
return result;
}, {});
} else {
data = { ...file, path, relative, base, basename, extname };
}
log(data);
stream.push(file);
});
};

View File

@ -1,18 +0,0 @@
const filter = require('gulp-filter');
module.exports = exports = function filter2 (pattern, options) {
if (pattern instanceof RegExp) {
return filter((file) => pattern.test(file.path), options);
}
return filter(pattern, options);
};
exports.not = function notfilter2 (pattern, options) {
if (pattern instanceof RegExp) {
return filter((file) => !pattern.test(file.path), options);
}
throw new Error('filter.not only takes regular expressions');
};

View File

@ -1,27 +0,0 @@
const through = require('./through');
const sortBy = require('lodash/sortBy');
function sleep (ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
module.exports = exports = function (iteratees) {
var files = [];
return through(
async (stream, file) => {
if (file.isNull()) return;
files.push(file);
},
async (stream) => {
const queue = sortBy(files, iteratees);
files = null;
for (const file of queue) {
stream.push(file);
await sleep(100);
}
},
);
};

View File

@ -1,19 +0,0 @@
const log = require('fancy-log');
var through = require('through2');
module.exports = exports = function asyncthrough (...args) {
const [ fn, donefn ] = args;
args[0] = function (file, enc, next) {
fn(this, file, enc).then(() => next(), (err) => { log.error(err, 'Error thrown'); next(err); });
};
if (donefn) {
args[1] = function (next) {
donefn(this).then(() => next(), (err) => { log.error(err, 'Error thrown'); next(err); });
};
}
return through.obj(...args);
};

View File

@ -2,12 +2,6 @@ const { src } = require('gulp');
const awspublish = require('gulp-awspublish'); const awspublish = require('gulp-awspublish');
const awsrouter = require('gulp-awspublish-router'); const awsrouter = require('gulp-awspublish-router');
const parallelize = require('concurrent-transform'); const parallelize = require('concurrent-transform');
// const cloudfront = require('gulp-cloudfront-invalidate-aws-publish');
const debug = require('./lib/debug');
// const path = require('path');
// const ROOT = path.dirname(__dirname);
const DEST = 'dist';
var credentials = require('../aws.json'); var credentials = require('../aws.json');
@ -44,7 +38,7 @@ const routes = {
module.exports = exports = function s3deploy () { module.exports = exports = function s3deploy () {
var publisher = awspublish.create(credentials); var publisher = awspublish.create(credentials);
return src(`${DEST}/**/*`) return src('dist/**/*')
.pipe(awsrouter({ .pipe(awsrouter({
cache: { cache: {
gzip: true, gzip: true,
@ -61,18 +55,3 @@ module.exports = exports = function s3deploy () {
states: [ 'create', 'update', 'delete' ], states: [ 'create', 'update', 'delete' ],
})); }));
}; };
exports.dryrun = function s3DryRun () {
return src(`${DEST}/**/*`)
.pipe(awsrouter({
cache: {
gzip: true,
cacheTime: 1800, // 30 minutes on client
sharedCacheTime: 86400, // one day on server
},
routes,
}))
.pipe(debug('s3'))
;
};

View File

@ -1,52 +0,0 @@
const path = require('path');
const { src, dest } = require('gulp');
const minify = require('gulp-minify');
const rev = require('gulp-rev');
const concat = require('gulp-concat');
const merge = require('merge-stream');
const asyncthrough = require('./lib/through');
const ROOT = path.dirname(__dirname);
const DEST = 'dist/js';
module.exports = exports = function sourceJS () {
return merge(
src([ 'js/*.js', 'js/_*.js' ]),
src([
require.resolve('jquery'),
require.resolve('magnific-popup'),
require.resolve('popper.js/dist/umd/popper.js'),
require.resolve('bootstrap/js/dist/util.js'),
require.resolve('bootstrap/js/dist/dropdown.js'),
'js/_*.js',
]).pipe(concat('global.js')),
).pipe(dest(DEST));
};
exports.prod = function sourceJSForProd () {
return exports()
.pipe(minify({
ext: { min: '.js' },
noSource: true,
}))
.pipe(dest(DEST))
.pipe(rev())
.pipe(dest(DEST))
.pipe(asyncthrough(async (stream, file) => {
// Change rev's original base path back to the public root so that it uses the full
// path as the original file name key in the manifest
var base = path.resolve(ROOT, 'dist');
file.revOrigBase = base;
file.base = base;
stream.push(file);
}))
.pipe(rev.manifest({
merge: true, // Merge with the existing manifest if one exists
}))
.pipe(dest('.'))
;
};

383
package-lock.json generated
View File

@ -348,12 +348,6 @@
"integrity": "sha512-K1DPVvnBCPxzD+G51/cxVIoc2X8uUVl1zpJeE6iKcgHMj4+tbat5Xu4TjV7v2QSDbIeAfLi2hIk+u2+s0MlpUQ==", "integrity": "sha512-K1DPVvnBCPxzD+G51/cxVIoc2X8uUVl1zpJeE6iKcgHMj4+tbat5Xu4TjV7v2QSDbIeAfLi2hIk+u2+s0MlpUQ==",
"dev": true "dev": true
}, },
"@types/minimatch": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==",
"dev": true
},
"@types/node": { "@types/node": {
"version": "13.7.1", "version": "13.7.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.1.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.1.tgz",
@ -625,12 +619,6 @@
"integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
"dev": true "dev": true
}, },
"array-differ": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz",
"integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==",
"dev": true
},
"array-each": { "array-each": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz",
@ -721,24 +709,12 @@
} }
} }
}, },
"array-union": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
"integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
"dev": true
},
"array-unique": { "array-unique": {
"version": "0.3.2", "version": "0.3.2",
"resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
"integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
"dev": true "dev": true
}, },
"arrify": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz",
"integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==",
"dev": true
},
"asn1": { "asn1": {
"version": "0.2.4", "version": "0.2.4",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
@ -1769,23 +1745,6 @@
"typedarray": "^0.0.6" "typedarray": "^0.0.6"
} }
}, },
"concat-with-sourcemaps": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz",
"integrity": "sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg==",
"dev": true,
"requires": {
"source-map": "^0.6.1"
},
"dependencies": {
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
}
}
},
"concurrent-transform": { "concurrent-transform": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/concurrent-transform/-/concurrent-transform-1.0.0.tgz", "resolved": "https://registry.npmjs.org/concurrent-transform/-/concurrent-transform-1.0.0.tgz",
@ -3044,15 +3003,6 @@
"parse-filepath": "^1.0.1" "parse-filepath": "^1.0.1"
} }
}, },
"first-chunk-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz",
"integrity": "sha1-G97NuOCDwGZLkZRVgVd6Q6nzHXA=",
"dev": true,
"requires": {
"readable-stream": "^2.0.2"
}
},
"flagged-respawn": { "flagged-respawn": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz",
@ -4393,31 +4343,6 @@
} }
} }
}, },
"gulp-better-rollup": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/gulp-better-rollup/-/gulp-better-rollup-4.0.1.tgz",
"integrity": "sha512-oUGrMd+p9umBPoIPYVDxFT4EwCzywh3o8q++eswJyAxrRgYCEM6OOGGxJLG+AmzzjEoiq0cc/ndgF5SH2qW3Fg==",
"dev": true,
"requires": {
"lodash.camelcase": "^4.3.0",
"plugin-error": "^1.0.1",
"vinyl": "^2.1.0",
"vinyl-sourcemaps-apply": "^0.2.1"
}
},
"gulp-changed": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/gulp-changed/-/gulp-changed-4.0.2.tgz",
"integrity": "sha512-rAvQt+ByaqrMuJLwucvxC+MC02Vh8ksiJ16hoQlk4xnmlHiLJMque2aXXQMmyocQac3RIjNRcyr7iG1TNH15GA==",
"dev": true,
"requires": {
"make-dir": "^3.0.0",
"plugin-error": "^1.0.1",
"replace-ext": "^1.0.0",
"through2": "^3.0.1",
"touch": "^3.1.0"
}
},
"gulp-clean": { "gulp-clean": {
"version": "0.4.0", "version": "0.4.0",
"resolved": "https://registry.npmjs.org/gulp-clean/-/gulp-clean-0.4.0.tgz", "resolved": "https://registry.npmjs.org/gulp-clean/-/gulp-clean-0.4.0.tgz",
@ -4493,174 +4418,6 @@
} }
} }
}, },
"gulp-cloudfront-invalidate-aws-publish": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/gulp-cloudfront-invalidate-aws-publish/-/gulp-cloudfront-invalidate-aws-publish-1.0.0.tgz",
"integrity": "sha1-7GpVBDZZMhy2rcehBfRwD1tP8Hw=",
"dev": true,
"requires": {
"aws-sdk": "^2.1.16",
"fancy-log": "1.3.x",
"plugin-error": "1.0.x",
"through2": "2.0.x"
},
"dependencies": {
"through2": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
"integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
"dev": true,
"requires": {
"readable-stream": "~2.3.6",
"xtend": "~4.0.1"
}
}
}
},
"gulp-concat": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/gulp-concat/-/gulp-concat-2.6.1.tgz",
"integrity": "sha1-Yz0WyV2IUEYorQJmVmPO5aR5M1M=",
"dev": true,
"requires": {
"concat-with-sourcemaps": "^1.0.0",
"through2": "^2.0.0",
"vinyl": "^2.0.0"
},
"dependencies": {
"through2": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
"integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
"dev": true,
"requires": {
"readable-stream": "~2.3.6",
"xtend": "~4.0.1"
}
}
}
},
"gulp-filter": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/gulp-filter/-/gulp-filter-6.0.0.tgz",
"integrity": "sha512-veQFW93kf6jBdWdF/RxMEIlDK2mkjHyPftM381DID2C9ImTVngwYpyyThxm4/EpgcNOT37BLefzMOjEKbyYg0Q==",
"dev": true,
"requires": {
"multimatch": "^4.0.0",
"plugin-error": "^1.0.1",
"streamfilter": "^3.0.0"
}
},
"gulp-minify": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/gulp-minify/-/gulp-minify-3.1.0.tgz",
"integrity": "sha512-ixF41aYg+NQikI8hpoHdEclYcQkbGdXQu1CBdHaU7Epg8H6e8d2jWXw1+rBPgYwl/XpKgjHj7NI6gkhoSNSSAg==",
"dev": true,
"requires": {
"ansi-colors": "^1.0.1",
"minimatch": "^3.0.2",
"plugin-error": "^0.1.2",
"terser": "^3.7.6",
"through2": "^2.0.3",
"vinyl": "^2.1.0"
},
"dependencies": {
"arr-diff": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz",
"integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=",
"dev": true,
"requires": {
"arr-flatten": "^1.0.1",
"array-slice": "^0.2.3"
}
},
"arr-union": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz",
"integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=",
"dev": true
},
"array-slice": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz",
"integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=",
"dev": true
},
"extend-shallow": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz",
"integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=",
"dev": true,
"requires": {
"kind-of": "^1.1.0"
}
},
"kind-of": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz",
"integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=",
"dev": true
},
"plugin-error": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz",
"integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=",
"dev": true,
"requires": {
"ansi-cyan": "^0.1.1",
"ansi-red": "^0.1.1",
"arr-diff": "^1.0.1",
"arr-union": "^2.0.1",
"extend-shallow": "^1.1.2"
}
},
"through2": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
"integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
"dev": true,
"requires": {
"readable-stream": "~2.3.6",
"xtend": "~4.0.1"
}
}
}
},
"gulp-rev": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/gulp-rev/-/gulp-rev-9.0.0.tgz",
"integrity": "sha512-Ytx/uzDA2xNxHlPG8GReS1ut00msd0HlKDk9Ai/0xF2yvg+DAeGRAviCFlQzQmdZtqAoXznYspwWoGEoxDvhyA==",
"dev": true,
"requires": {
"modify-filename": "^1.1.0",
"plugin-error": "^1.0.1",
"rev-hash": "^2.0.0",
"rev-path": "^2.0.0",
"sort-keys": "^2.0.0",
"through2": "^2.0.0",
"vinyl": "^2.1.0",
"vinyl-file": "^3.0.0"
},
"dependencies": {
"rev-hash": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/rev-hash/-/rev-hash-2.0.0.tgz",
"integrity": "sha1-dyCiNu0MJY3z5kvsA+wEiwW5JMQ=",
"dev": true
},
"through2": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
"integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
"dev": true,
"requires": {
"readable-stream": "~2.3.6",
"xtend": "~4.0.1"
}
}
}
},
"gulplog": { "gulplog": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz",
@ -5318,12 +5075,6 @@
"integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==",
"dev": true "dev": true
}, },
"is-plain-obj": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz",
"integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=",
"dev": true
},
"is-plain-object": { "is-plain-object": {
"version": "2.0.4", "version": "2.0.4",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
@ -5707,12 +5458,6 @@
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
"dev": true "dev": true
}, },
"lodash.camelcase": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz",
"integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=",
"dev": true
},
"lodash.chunk": { "lodash.chunk": {
"version": "4.2.0", "version": "4.2.0",
"resolved": "https://registry.npmjs.org/lodash.chunk/-/lodash.chunk-4.2.0.tgz", "resolved": "https://registry.npmjs.org/lodash.chunk/-/lodash.chunk-4.2.0.tgz",
@ -5784,15 +5529,6 @@
"integrity": "sha1-PnNixb0Y9nhf6Z5Z0BPiCvM9MEk=", "integrity": "sha1-PnNixb0Y9nhf6Z5Z0BPiCvM9MEk=",
"dev": true "dev": true
}, },
"make-dir": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.2.tgz",
"integrity": "sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w==",
"dev": true,
"requires": {
"semver": "^6.0.0"
}
},
"make-fetch-happen": { "make-fetch-happen": {
"version": "8.0.1", "version": "8.0.1",
"resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-8.0.1.tgz", "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-8.0.1.tgz",
@ -5979,12 +5715,6 @@
"integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=",
"dev": true "dev": true
}, },
"merge-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
"integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
"dev": true
},
"methods": { "methods": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
@ -6241,19 +5971,6 @@
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true "dev": true
}, },
"multimatch": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/multimatch/-/multimatch-4.0.0.tgz",
"integrity": "sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==",
"dev": true,
"requires": {
"@types/minimatch": "^3.0.3",
"array-differ": "^3.0.0",
"array-union": "^2.1.0",
"arrify": "^2.0.1",
"minimatch": "^3.0.4"
}
},
"mute-stdout": { "mute-stdout": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz", "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz",
@ -6494,15 +6211,6 @@
} }
} }
}, },
"nopt": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
"integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=",
"dev": true,
"requires": {
"abbrev": "1"
}
},
"normalize-package-data": { "normalize-package-data": {
"version": "2.5.0", "version": "2.5.0",
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
@ -8372,15 +8080,6 @@
} }
} }
}, },
"sort-keys": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz",
"integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=",
"dev": true,
"requires": {
"is-plain-obj": "^1.0.0"
}
},
"source-map": { "source-map": {
"version": "0.5.7", "version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
@ -8563,28 +8262,6 @@
"integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==",
"dev": true "dev": true
}, },
"streamfilter": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/streamfilter/-/streamfilter-3.0.0.tgz",
"integrity": "sha512-kvKNfXCmUyC8lAXSSHCIXBUlo/lhsLcCU/OmzACZYpRUdtKIH68xYhm/+HI15jFJYtNJGYtCgn2wmIiExY1VwA==",
"dev": true,
"requires": {
"readable-stream": "^3.0.6"
},
"dependencies": {
"readable-stream": {
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.5.0.tgz",
"integrity": "sha512-gSz026xs2LfxBPudDuI41V1lka8cxg64E66SGe78zJlsUofOg/yqwezdIcdfwik6B4h8LFmWPA9ef9X3FiNFLA==",
"dev": true,
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
}
}
}
},
"string-collapse-leading-whitespace": { "string-collapse-leading-whitespace": {
"version": "2.0.13", "version": "2.0.13",
"resolved": "https://registry.npmjs.org/string-collapse-leading-whitespace/-/string-collapse-leading-whitespace-2.0.13.tgz", "resolved": "https://registry.npmjs.org/string-collapse-leading-whitespace/-/string-collapse-leading-whitespace-2.0.13.tgz",
@ -8699,25 +8376,6 @@
"is-utf8": "^0.2.0" "is-utf8": "^0.2.0"
} }
}, },
"strip-bom-buf": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/strip-bom-buf/-/strip-bom-buf-1.0.0.tgz",
"integrity": "sha1-HLRar1dTD0yvhsf3UXnSyaUd1XI=",
"dev": true,
"requires": {
"is-utf8": "^0.2.1"
}
},
"strip-bom-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz",
"integrity": "sha1-+H217yYT9paKpUWr/h7HKLaoKco=",
"dev": true,
"requires": {
"first-chunk-stream": "^2.0.0",
"strip-bom": "^2.0.0"
}
},
"strip-indent": { "strip-indent": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz",
@ -8871,14 +8529,14 @@
} }
}, },
"terser": { "terser": {
"version": "3.17.0", "version": "4.6.4",
"resolved": "https://registry.npmjs.org/terser/-/terser-3.17.0.tgz", "resolved": "https://registry.npmjs.org/terser/-/terser-4.6.4.tgz",
"integrity": "sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ==", "integrity": "sha512-5fqgBPLgVHZ/fVvqRhhUp9YUiGXhFJ9ZkrZWD9vQtFBR4QIGTnbsb+/kKqSqfgp3WnBwGWAFnedGTtmX1YTn0w==",
"dev": true, "dev": true,
"requires": { "requires": {
"commander": "^2.19.0", "commander": "^2.20.0",
"source-map": "~0.6.1", "source-map": "~0.6.1",
"source-map-support": "~0.5.10" "source-map-support": "~0.5.12"
}, },
"dependencies": { "dependencies": {
"source-map": { "source-map": {
@ -9056,15 +8714,6 @@
"integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==",
"dev": true "dev": true
}, },
"touch": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
"integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
"dev": true,
"requires": {
"nopt": "~1.0.10"
}
},
"tough-cookie": { "tough-cookie": {
"version": "2.5.0", "version": "2.5.0",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
@ -9538,19 +9187,6 @@
"replace-ext": "^1.0.0" "replace-ext": "^1.0.0"
} }
}, },
"vinyl-file": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/vinyl-file/-/vinyl-file-3.0.0.tgz",
"integrity": "sha1-sQTZ5ECf+jJfqt1SBkLQo7SIs2U=",
"dev": true,
"requires": {
"graceful-fs": "^4.1.2",
"pify": "^2.3.0",
"strip-bom-buf": "^1.0.0",
"strip-bom-stream": "^2.0.0",
"vinyl": "^2.0.1"
}
},
"vinyl-fs": { "vinyl-fs": {
"version": "3.0.3", "version": "3.0.3",
"resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz",
@ -9614,15 +9250,6 @@
} }
} }
}, },
"vinyl-sourcemaps-apply": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz",
"integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=",
"dev": true,
"requires": {
"source-map": "^0.5.1"
}
},
"whatwg-fetch": { "whatwg-fetch": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz", "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz",

View File

@ -48,14 +48,7 @@
"gulp": "~4.0.2", "gulp": "~4.0.2",
"gulp-awspublish": "~4.1.1", "gulp-awspublish": "~4.1.1",
"gulp-awspublish-router": "~0.2.0", "gulp-awspublish-router": "~0.2.0",
"gulp-better-rollup": "~4.0.1",
"gulp-changed": "~4.0.2",
"gulp-clean": "~0.4.0", "gulp-clean": "~0.4.0",
"gulp-cloudfront-invalidate-aws-publish": "~1.0.0",
"gulp-concat": "~2.6.1",
"gulp-filter": "~6.0.0",
"gulp-minify": "~3.1.0",
"gulp-rev": "~9.0.0",
"handlebars": "~4.7.3", "handlebars": "~4.7.3",
"hbs-kit": "~1.2.0", "hbs-kit": "~1.2.0",
"html-minifier-terser": "~5.0.4", "html-minifier-terser": "~5.0.4",
@ -67,7 +60,6 @@
"markdown-it": "~10.0.0", "markdown-it": "~10.0.0",
"markdown-it-anchor": "~5.2.5", "markdown-it-anchor": "~5.2.5",
"memoizepromise": "~2.0.0", "memoizepromise": "~2.0.0",
"merge-stream": "~2.0.0",
"minimist": "~1.2.0", "minimist": "~1.2.0",
"morgan": "~1.9.1", "morgan": "~1.9.1",
"node-sass": "~4.13.1", "node-sass": "~4.13.1",
@ -87,11 +79,11 @@
"serve-index": "~1.9.1", "serve-index": "~1.9.1",
"slugify": "~1.3.6", "slugify": "~1.3.6",
"string-strip-html": "~4.3.16", "string-strip-html": "~4.3.16",
"terser": "~4.6.4",
"through2": "~3.0.1", "through2": "~3.0.1",
"twemoji": "~12.1.5", "twemoji": "~12.1.5",
"twitter-lite": "~0.9.4", "twitter-lite": "~0.9.4",
"uuid": "~3.4.0", "uuid": "~3.4.0"
"vinyl": "~2.2.0"
}, },
"dependencies": {} "dependencies": {}
} }