First bit of real UI code landed

This commit is contained in:
Jake Archibald
2020-09-23 14:38:41 +01:00
parent 6573103755
commit 455c868e55
23 changed files with 839 additions and 141 deletions

View File

@@ -101,7 +101,7 @@ export default function (resolveFileUrl) {
hashToId = new Map();
pathToResult = new Map();
const cssPaths = await globP('src/static-build/**/*.css', {
const cssPaths = await globP('src/**/*.css', {
nodir: true,
absolute: true,
});
@@ -126,11 +126,11 @@ export default function (resolveFileUrl) {
const cssClassExports = Object.entries(moduleJSON).map(
([key, val]) =>
`export const $${camelCase(key)} = ${JSON.stringify(val)};`,
`export const ${camelCase(key)} = ${JSON.stringify(val)};`,
);
const defs = Object.keys(moduleJSON)
.map((key) => `export const $${camelCase(key)}: string;`)
.map((key) => `export const ${camelCase(key)}: string;`)
.join('\n');
const defPath = path + '.d.ts';