Experimental port to Firebase hosting

This commit is contained in:
Michael Jackson
2019-01-05 16:50:05 -08:00
parent e4d6df255e
commit 31e7d3865a
300 changed files with 129300 additions and 5817 deletions

View File

@ -1,4 +1,4 @@
const url = require('url');
import url from 'url';
const packageURLFormat = /^\/((?:@[^/@]+\/)?[^/@]+)(?:@([^/]+))?(\/.*)?$/;
@ -14,7 +14,7 @@ function decodeParam(param) {
return '';
}
function parsePackageURL(originalURL) {
export default function parsePackageURL(originalURL) {
const { pathname, search, query } = url.parse(originalURL, true);
const match = packageURLFormat.exec(pathname);
@ -37,5 +37,3 @@ function parsePackageURL(originalURL) {
filename // /file.js
};
}
module.exports = parsePackageURL;