summaryrefslogtreecommitdiff
path: root/src/compiler/codegen.ts (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-04-12Renaming to import.meta.fetchContent (#70)Gravatar Drew Powers 1-622/+0
* Change to import.meta.glob() Change of plans—maintain parity with Snowpack and Vite because our Collections API will use a different interface * Get basic pagination working * Get params working * Rename to import.meta.fetchContent * Upgrade to fdir
2021-04-12chore fix lint reduce errors generated (#83)Gravatar duncanhealy 1-0/+5
* add dep domhandler imported in in src/build/static * lint and jsDoc error * move domhandler to devDep * chore: add package lock * escape string jsDoc * chore: add astro dep in until prism import is refactored * chore: add snowpack example package lock
2021-04-10update package.jsonGravatar Fred K. Schott 1-2/+2
2021-04-09Use import specifier rather than filename (#71)Gravatar Drew Powers 1-1/+4
2021-04-09[ci] npm run formatGravatar matthewp 1-2/+2
2021-04-09Parse inner JSX as Astro (#67)Gravatar Matthew Phillips 1-36/+31
* Parse inner JSX as Astro This completes the compiler changes, updating the parser so that it parses inner "JSX" as Astro. It does this by finding the start and end of HTML tags and feeds that back into the parser. The result is a structure like this: ``` { type: 'MustacheTag', expression: [ { type: 'Expression', codeStart: 'colors.map(color => (', codeEnd: '}}' children: [ { type: 'Fragment', children: [ { type: 'Element', name: 'div' } ] } ] } ] } ``` There is a new Node type, `Expression`. Note that `MustacheTag` remains in the tree, all it contains is an Expression though. I could spend some time trying to remove it, there's just a few places that expect it to exist. * Update import to the transform * Transform prism components into expressions
2021-04-06Blog Support 1/3: Data fetching (#62)Gravatar Drew Powers 1-9/+106
* Add example blog * Add author data * Improve navigation * Style nav * Add friendly error message * Throw error if import glob used for non-Markdown files * Use import.meta.collection() API instead * README fixes
2021-04-06[ci] npm run formatGravatar matthewp 1-1/+1
2021-04-06Compiler cleanup (#64)Gravatar Matthew Phillips 1-68/+71
* Compiler cleanup This is general compiler cleanup, especially around the codegen part. Goals here were too: 1. Make it possible to compile HTML recursively (needed for future astro-in-expressions work) by moving that work into its own function. 1. Get rid of collectionItems and have compiling the HTML return just a source string. Also not planned, this change gets rid of the different between components and pages. All Astro components compile to the same JavaScript. * Remove unused node types
2021-04-02Fix React import (#55)Gravatar Drew Powers 1-2/+2
* Fix React import * Change default export * Fix :visible dynamic component * Use colon to alias vue createElement Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2021-04-01Annoying Lint PR #2 (#47)Gravatar Drew Powers 1-4/+20
2021-03-31Extract Astro styles to external stylesheets (#43)Gravatar Drew Powers 1-8/+26
* Extract Astro styles to external stylesheets * Require relative URLs in Markdown layouts
2021-03-30[ci] npm run formatGravatar matthewp 1-2/+2
2021-03-30Resolve component URLs during compilation (#40)Gravatar Matthew Phillips 1-7/+18
Previously dynamic component URLs were being resolved client-side in a weird way that only worked during dev. This change makes them handle during compilation, so it works in both (and improves readability of the dynamic import output).
2021-03-30Bundling! 🤘 (#36)Gravatar Matthew Phillips 1-3/+1
* Bundling! 🤘 * Finalize build changes
2021-03-26New hydration methods (#29)Gravatar Nate Moore 1-40/+56
* WIP: new hydration methods * refactor: genericize load/idle/visible renderers * fix: do not pass "data-astro-id" to component * docs: add hydration section to README * docs: update README Co-authored-by: Nate Moore <nate@skypack.dev>
2021-03-25Add React component SSR (#28)Gravatar Drew Powers 1-14/+15
* Add React component SSR * Add React component SSR
2021-03-25First pass at the build (#27)Gravatar Matthew Phillips 1-28/+52
This updates `astro build` to do a production build. It works! No optimizations yet.
2021-03-25add component state, top-level await support (#26)Gravatar Fred K. Schott 1-0/+435