Archive commit

This commit is contained in:
Erik McClure
2019-08-28 21:15:02 -07:00
commit 735845746e
1435 changed files with 140724 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
import { REV } from '../generated/rev';
/* istanbul ignore next */
export function getUrl(name: string): string {
if (DEVELOPMENT)
return `/assets/${name}`;
if (!REV[name])
throw new Error(`Cannot find file url (${name})`);
return `/assets/${name.replace(/(\.\S+)$/, `-${REV[name]}$1`)}`;
}