Rename dirs to avoid creating lambdas (#91)
This commit is contained in:
parent
a13bfb3c9d
commit
c06a2f573d
|
@ -7,9 +7,9 @@ const twemoji = require('twemoji');
|
|||
const twOptions = { folder: 'svg', ext: '.svg' };
|
||||
const emojify = (text: string) => twemoji.parse(text, twOptions);
|
||||
|
||||
const regular = readFileSync(`${__dirname}/../fonts/Inter-Regular.woff2`).toString('base64');
|
||||
const bold = readFileSync(`${__dirname}/../fonts/Inter-Bold.woff2`).toString('base64');
|
||||
const mono = readFileSync(`${__dirname}/../fonts/Vera-Mono.woff2`).toString('base64');
|
||||
const rglr = readFileSync(`${__dirname}/../_fonts/Inter-Regular.woff2`).toString('base64');
|
||||
const bold = readFileSync(`${__dirname}/../_fonts/Inter-Bold.woff2`).toString('base64');
|
||||
const mono = readFileSync(`${__dirname}/../_fonts/Vera-Mono.woff2`).toString('base64');
|
||||
|
||||
function getCss(theme: string, fontSize: string) {
|
||||
let background = 'white';
|
||||
|
@ -26,7 +26,7 @@ function getCss(theme: string, fontSize: string) {
|
|||
font-family: 'Inter';
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
src: url(data:font/woff2;charset=utf-8;base64,${regular}) format('woff2');
|
||||
src: url(data:font/woff2;charset=utf-8;base64,${rglr}) format('woff2');
|
||||
}
|
||||
|
||||
@font-face {
|
|
@ -1,8 +1,8 @@
|
|||
import { IncomingMessage, ServerResponse } from 'http';
|
||||
import { parseRequest } from './parser';
|
||||
import { getScreenshot } from './chromium';
|
||||
import { getHtml } from './template';
|
||||
import { writeTempFile, pathToFileURL } from './file';
|
||||
import { parseRequest } from './_lib/parser';
|
||||
import { getScreenshot } from './_lib/chromium';
|
||||
import { getHtml } from './_lib/template';
|
||||
import { writeTempFile, pathToFileURL } from './_lib/file';
|
||||
|
||||
const isDev = process.env.NOW_REGION === 'dev1';
|
||||
const isHtmlDebug = process.env.OG_HTML_DEBUG === '1';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { ParsedRequest, Theme, FileType } from '../api/types';
|
||||
import { ParsedRequest, Theme, FileType } from '../api/_lib/types';
|
||||
const { H, R, copee } = (window as any);
|
||||
let timeout = -1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue