Skip to content

Commit 74dc01d

Browse files
feat: #8 inital styles and layout (#16)
1 parent 2787bb7 commit 74dc01d

21 files changed

Lines changed: 671 additions & 9 deletions

greenwood.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1+
import { greenwoodPluginImportRaw } from '@greenwood/plugin-import-raw';
2+
import { greenwoodPluginCssModules } from '@greenwood/plugin-css-modules';
3+
import { greenwoodPluginImportJsx } from '@greenwood/plugin-import-jsx';
14
import { replBundlerResourcePlugin } from './repl-bundler-plugin.ts';
25
import type { Config } from "@greenwood/cli";
36

47
const config: Config = {
8+
prerender: true,
59
plugins: [
10+
greenwoodPluginCssModules(),
11+
greenwoodPluginImportRaw(),
12+
greenwoodPluginImportJsx(),
613
replBundlerResourcePlugin()
714
]
815
};

package-lock.json

Lines changed: 69 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,20 @@
1616
"type": "module",
1717
"scripts": {
1818
"dev": "greenwood develop",
19-
"build": "greenwood build",
19+
"build": "NODE_OPTIONS='--import @greenwood/cli/register' greenwood build",
2020
"serve": "greenwood serve",
2121
"check": "tsc",
2222
"postinstall": "patch-package"
2323
},
24+
"dependencies": {
25+
"geist": "^1.2.0",
26+
"open-props": "^1.7.23"
27+
},
2428
"devDependencies": {
25-
"@greenwood/cli": "~0.34.0-alpha.3",
29+
"@greenwood/cli": "~0.34.0-alpha.4",
30+
"@greenwood/plugin-css-modules": "^0.34.0-alpha.4",
31+
"@greenwood/plugin-import-raw": "^0.34.0-alpha.4",
32+
"@greenwood/plugin-import-jsx": "^0.34.0-alpha.4",
2633
"patch-package": "^8.0.1",
2734
"typescript": "^5.9.2"
2835
}

patches/wc-compiler+0.19.0.patch

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
diff --git a/node_modules/wc-compiler/src/jsx.d.ts b/node_modules/wc-compiler/src/jsx.d.ts
2+
index 2dc9baa..a2cb857 100644
3+
--- a/node_modules/wc-compiler/src/jsx.d.ts
4+
+++ b/node_modules/wc-compiler/src/jsx.d.ts
5+
@@ -3,12 +3,17 @@ type IsCSSStyleDeclaration<T> = T extends CSSStyleDeclaration ? string : T;
6+
7+
// create a utility type to extract the attributes from any given element's DOM interface.
8+
type ElementAttributes<E extends HTMLElement> = {
9+
- // Extract all properties from the element, including inherited ones.
10+
+ // Extract all properties from the element, including inherited ones
11+
[A in keyof E]?: E[A] extends (...args: any) => any ? any : IsCSSStyleDeclaration<E[A]>;
12+
} & {
13+
class?: string;
14+
-};
15+
-
16+
+ // have to manage this manually, can't seem to get this from TypeScript itself (not sure if just skill issue? :D)
17+
+ // https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/1790
18+
+ // it should be there per https://github.com/mdn/browser-compat-data/pull/21875
19+
+ // https://github.com/ProjectEvergreen/wcc/issues/236
20+
+ popovertarget?: string;
21+
+ popovertargetaction?: 'show' | 'hide' | 'toggle';
22+
+}
23+
// map each HTML tag to a union of its attributes and the global attributes.
24+
type IntrinsicElementsFromDom = {
25+
[E in keyof HTMLElementTagNameMap]: ElementAttributes<HTMLElementTagNameMap[E]>;

src/assets/bluesky.svg

Lines changed: 4 additions & 0 deletions
Loading

src/assets/discord.svg

Lines changed: 3 additions & 0 deletions
Loading

src/assets/github.svg

Lines changed: 3 additions & 0 deletions
Loading

src/assets/tile.svg

Lines changed: 12 additions & 0 deletions
Loading

src/assets/twitter-logo.svg

Lines changed: 3 additions & 0 deletions
Loading

src/assets/wcc-logo-og.png

1.69 KB
Loading

0 commit comments

Comments
 (0)