summaryrefslogtreecommitdiff
path: root/src (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-04-16[ci] npm run formatGravatar matthewp 1-6/+14
2021-04-16Pass mode into snowpack runtime (#99)Gravatar Matthew Phillips 2-5/+5
* Pass the `mode` through to snowpack This allows the production packages to be prepared. * Use snowpack 3.3.1 * Update path to prism loadComponents external ref * Upgrade to snowpack 3.3.2
2021-04-15[ci] npm run formatGravatar natemoo-re 10-186/+184
2021-04-15Support children inside of components (#72)Gravatar Nate Moore 13-28/+323
* chore(examples): add kitchen-sink * feat: support children in rendered components * feat: add support for rendering children in Svelte * fix: cleanup p/react fragment children * chore: add @ts-nocheck to svelte files * chore: update lockfiles * fix: types * feat: memoize frontend/renderer/utils * fix: disable eslint for compiled SvelteWrapper * fix: add missing dep Co-authored-by: Nate Moore <nate@skypack.dev>
2021-04-14Add collections to build (#94)Gravatar Drew Powers 2-29/+133
2021-04-14Add Windows Support (#93)Gravatar Drew Powers 5-14/+20
* Add Windows to test suite * Try implicit URL
2021-04-14Improve Tailwind docs & Tailwind support (#92)Gravatar Drew Powers 2-3/+4
2021-04-13Add Astro.fetchContent API (#91)Gravatar Drew Powers 5-17/+38
2021-04-13fix: bundle client-side code for components used in .md pages (#78)Gravatar Matt Mulder 2-10/+21
2021-04-13add content-type to astro html (#85)Gravatar Jonathan Neal 1-0/+1
2021-04-12Renaming to import.meta.fetchContent (#70)Gravatar Drew Powers 8-99/+409
* 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 12-4/+25
* 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-10fix plugins relative issueGravatar Fred K. Schott 1-1/+10
2021-04-10update package.jsonGravatar Fred K. Schott 1-2/+2
2021-04-10cleanup landing page, and small fixGravatar Fred K. Schott 1-1/+3
2021-04-09Use import specifier rather than filename (#71)Gravatar Drew Powers 1-1/+4
2021-04-09[ci] npm run formatGravatar matthewp 4-39/+36
2021-04-09Parse inner JSX as Astro (#67)Gravatar Matthew Phillips 17-152/+333
* 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-09[ci] npm run formatGravatar matthewp 1-3/+5
2021-04-09Improve renderer types (#69)Gravatar Matthew Phillips 6-10/+20
* Improve renderer types Looking at the render code I noticed that the Component rendering is not typed. This adds that, might help prevent a bug in the future. * Create the supported renderer type
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 4-5/+91
* 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-06Blog Support 1/3: Data fetching (#62)Gravatar Drew Powers 2-16/+112
* 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 3-83/+78
* 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-05Allow no config (#61)Gravatar Drew Powers 2-15/+59
* Allow no config * Update README
2021-04-05[ci] npm run formatGravatar matthewp 3-28/+31
2021-04-05Improve searching for pages (#60)Gravatar Matthew Phillips 3-57/+123
This improves the algorithm for searching for pages. It now works like: 1. If pathname ends with / 1. Look for PATHNAME/index.astro 1. Look for PATHNAME/index.md 1. else 1. Look for PATHNAME.astro 1. Look for PATHNAME.md 1. Look for PATHNAME/index.astro 1. 301 1. Look for PATHNAME/index.md 1. 301 1. 404
2021-04-02Add type declarations (#59)Gravatar Drew Powers 6-26/+42
2021-04-02Fix scoping issues (#58)Gravatar Drew Powers 3-9/+31
2021-04-02Add Tailwind support (#57)Gravatar Drew Powers 3-17/+66
2021-04-02Fix body from being scoped (#56)Gravatar Drew Powers 2-9/+30
2021-04-02Fix React import (#55)Gravatar Drew Powers 4-7/+7
* 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-02Get CSS Modules working in Vue (#53)Gravatar Drew Powers 5-10/+10
2021-04-01Remove errant console.log (#51)Gravatar Matthew Phillips 1-1/+0
2021-04-01[ci] npm run formatGravatar matthewp 3-10/+8
2021-04-01Fix complex MDX parsing (#50)Gravatar Matthew Phillips 6-11/+58
* Fix complex MDX parsing This allows fully MDX support using the micromark MDX extension. One caveat is that if you do something like use the less than sign, you need to escape it because the parser expects these to be tags otherwise. * Move micromark definition
2021-04-01Annoying Lint PR #2 (#47)Gravatar Drew Powers 30-46/+151
2021-04-01Add runtime mode (#48)Gravatar Drew Powers 10-32/+48
2021-03-31Implements import.meta.request (#46)Gravatar Matthew Phillips 1-4/+3
This adds `import.meta.request` to pages (not components).
2021-03-31Support for custom elements (#45)Gravatar Matthew Phillips 6-7/+120
* 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-31Implement fallback capability (#44)Gravatar Matthew Phillips 4-13/+36
* Implement fallback capability This makes it possible for a dynamic component to render fallback content on the server. The mechanism is a special `static` prop passed to the component. If `static` is true then the component knows it can render static content. Putting aside the word `static`, is this the right approach? I think giving components the flexibility to make the decision themselves *is* the right approach. However in this case we have a special property that is passed in non-explicitly. I think we have to do it this way because if the caller passes in a prop it will get serialized and appear on the client. By making this something we *add* during rendering, it only happens on the server (and only when using `:load`). Assuming this is the right approach, is `static` the right name for this prop? Other candidates: * `server` That's all I have! * Use `import.meta.env.astro` to tell if running in SSR mode. * Run formatter
2021-03-31Extract Astro styles to external stylesheets (#43)Gravatar Drew Powers 6-82/+92
* Extract Astro styles to external stylesheets * Require relative URLs in Markdown layouts
2021-03-30remove unused fnGravatar Fred K. Schott 1-13/+0
2021-03-30[ci] npm run formatGravatar matthewp 1-1/+1
2021-03-30Add minification (#42)Gravatar Matthew Phillips 1-1/+7
2021-03-30[ci] npm run formatGravatar matthewp 1-2/+2
2021-03-30Resolve component URLs during compilation (#40)Gravatar Matthew Phillips 5-15/+26
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-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