Small tweaks

This commit is contained in:
Michael Jackson
2018-04-03 22:32:32 -07:00
parent 7a9dfd2260
commit fac3f4c5be
9 changed files with 33 additions and 29 deletions

View File

@ -1,5 +1,6 @@
const fs = require("fs");
const path = require("path");
const getFileStats = require("./getFileStats");
function getEntries(dir) {

View File

@ -1,6 +1,7 @@
const fs = require("fs");
const path = require("path");
const SRIToolbox = require("sri-toolbox");
const getFileContentType = require("./getFileContentType");
const getFileStats = require("./getFileStats");
const getFileType = require("./getFileType");

View File

@ -2,11 +2,11 @@ const redis = require("redis");
redis.debug_mode = process.env.DEBUG_REDIS != null;
const RedisURL =
const redisURL =
process.env.OPENREDIS_URL ||
process.env.REDIS_URL ||
"redis://localhost:6379";
const client = redis.createClient(RedisURL);
const client = redis.createClient(redisURL);
module.exports = client;

View File

@ -1,7 +1,7 @@
const URL = require("whatwg-url");
const warning = require("warning");
const BareIdentifierFormat = /^((?:@[^\/]+\/)?[^\/]+)(\/.*)?$/;
const bareIdentifierFormat = /^((?:@[^\/]+\/)?[^\/]+)(\/.*)?$/;
function unpkgRewriteBabelPlugin(dependencies = {}) {
return {
@ -22,7 +22,7 @@ function unpkgRewriteBabelPlugin(dependencies = {}) {
path.node.source.value = `${path.node.source.value}?module`;
} else {
// "bare" identifier
const match = BareIdentifierFormat.exec(path.node.source.value);
const match = bareIdentifierFormat.exec(path.node.source.value);
const packageName = match[1];
const file = match[2] || "";