summaryrefslogtreecommitdiff
path: root/src/compiler/optimize/index.ts (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-04-09Parse inner JSX as Astro (#67)Gravatar Matthew Phillips 1-98/+0
* 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-08Add support for syntax highlighting of code blocks (#65)Gravatar Matthew Phillips 1-3/+4
* Add support for syntax highlighting of code blocks * Escape usage of backtick strings * Add workspace root for snowpack * Use prismjs/components as an external module
2021-04-01Annoying Lint PR #2 (#47)Gravatar Drew Powers 1-0/+10
2021-04-01Add runtime mode (#48)Gravatar Drew Powers 1-8/+1
2021-03-31Support for custom elements (#45)Gravatar Matthew Phillips 1-3/+7
* Support for custom elements Now you can use custom elements like so in Astro components: ```html <script type="module" src="./datepicker.js"> <date-picker></date-picker> ``` These will be resolve relative to the current astro component. In the build these modules are run through the same bundle/minify process as components. * Remove component from public * Formatting * Disable empty fn rule
2021-03-30Add support for doctype (#37)Gravatar Matthew Phillips 1-5/+8
* Add support for doctype * Automatically prepend doctype
2021-03-26[ci] npm run formatGravatar drwpow 1-4/+2
2021-03-25First pass at the build (#27)Gravatar Matthew Phillips 1-1/+7
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/+83