summaryrefslogtreecommitdiff
path: root/src/compiler/optimize (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-04-09Parse inner JSX as Astro (#67)Gravatar Matthew Phillips 6-652/+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-08[ci] npm run formatGravatar matthewp 1-1/+1
2021-04-08Add support for syntax highlighting of code blocks (#65)Gravatar Matthew Phillips 2-3/+89
* 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-02Fix scoping issues (#58)Gravatar Drew Powers 2-9/+26
2021-04-02Add Tailwind support (#57)Gravatar Drew Powers 1-15/+63
2021-04-02Fix body from being scoped (#56)Gravatar Drew Powers 2-9/+30
2021-04-01Annoying Lint PR #2 (#47)Gravatar Drew Powers 5-10/+24
2021-04-01Add runtime mode (#48)Gravatar Drew Powers 2-15/+21
2021-03-31Support for custom elements (#45)Gravatar Matthew Phillips 2-3/+49
* 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-31Extract Astro styles to external stylesheets (#43)Gravatar Drew Powers 1-27/+9
* Extract Astro styles to external stylesheets * Require relative URLs in Markdown layouts
2021-03-30Fix nested parens bug (#39)Gravatar Drew Powers 2-2/+7
2021-03-30Convert CSS Modules to scoped styles (#38)Gravatar Drew Powers 2-68/+117
* Convert CSS Modules to scoped styles * Update README * Move class scoping into HTML walker * Fix SSR styles test * Fix mustache tags * Update PostCSS plugin name * Add JSDoc comment * Update test
2021-03-30[ci] npm run formatGravatar matthewp 1-10/+11
2021-03-30Add support for doctype (#37)Gravatar Matthew Phillips 2-5/+41
* Add support for doctype * Automatically prepend doctype
2021-03-26[ci] npm run formatGravatar drwpow 1-4/+2
2021-03-26Fix JSX CSS Modules classes (#31)Gravatar Drew Powers 1-12/+17
2021-03-25Improve styles (#30)Gravatar Drew Powers 1-12/+48
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 2-0/+296