File tree Expand file tree Collapse file tree 1 file changed +59
-0
lines changed
Expand file tree Collapse file tree 1 file changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ title : amdx-0.8 MDXX => AMDX へ
3+ created : 1589389359440
4+ ---
5+
6+ ## mdxx => amdx
7+
8+ MDX eXtended => Accelarated MDX
9+
10+ - ` mdxx-ssg ` => ` amdxg `
11+ - ` mdxx-* ` => ` amdx-* `
12+ - ` mdxx-parser ` => ` amdx `
13+ - ` mdxx-compiler ` => ` amdx-runner `
14+
15+ mdxx-parser がほぼ全部の変換を担ってたので、リネームついでに ` amdx ` というライブラリに変更。
16+
17+ パッケージ名を変えた理由ですが、 mdxx という名前は、MDMA などの合成ドラッグの総称として使われる言葉であんまりイメージがよくなく、また、AMP のフィーチャーが重くなってきたので、A の文字を頭に付けました。
18+
19+ [ Urban Dictionary: mdxx] ( https://www.urbandictionary.com/define.php?term=mdxx )
20+
21+ ## 変更
22+
23+ - ` amdxg-cli ` : ` amdxg new:page [slug] ` でのページ生成に、必ず日時プレフィックスがつくようにしました。記事が増えたときの
24+
25+ ## バグ修正
26+
27+ - ` amdxg-components ` : tailwind の導入と purgecss の導入で本来必要な CSS を削ってしまっていたのをもとに戻しました。
28+
29+ ## 開発中の機能
30+
31+ ### next.js 9.4 の SSG Auto generation で now 対応
32+
33+ 現在は ` next export ` する前提で作っているが、9.4 の段階的 SSG で, now にデプロイできるようにしたい。
34+
35+ ### ` amdxg new:script `
36+
37+ ` amp-script ` を使った Component の雛形を追加します。amp-sciprt は 150kb 制限があり、また動的コンポーネントの追加には、SSR 相当の処理が必要です。なので今回は React ではなく preact を使うことにしました。
38+
39+ あるいは、 markdown で ` tsx:amp-script ` のようなコードブロックから自動生成することや、wasm を使った処理を考えています。
40+
41+ ``` tsx:amp-script
42+ /** @jsx h */
43+ import { h } from "preact";
44+ import { useState } from "preact/hooks";
45+
46+ export default function Counter(props: { initialValue: number }) {
47+ const [state, setState] = useState(props.initialValue);
48+ return (
49+ <div>
50+ <h1>Counter Example</h1>
51+ <span>{String(state)}</span>
52+ <button onClick={() => setState((n) => n + 1)}>+</button>
53+ <button onClick={() => setState((n) => n - 1)}>-</button>
54+ </div>
55+ );
56+ }
57+ ```
58+
59+ こういうコードブロックを抽出して、rollup でビルドしたコードを生成できそう
You can’t perform that action at this time.
0 commit comments