Commit graph

15 commits

Author SHA1 Message Date
Nate Moore
54409a0702
Prettier support for .astro files (#106)
* docs: fix readme

* chore: scaffold prettier plugin

* chore(prettier): switch to cjs

* test(prettier): scaffold prettier tests

* test(prettier): add simple prettier tests

* feat(prettier): first pass

* refactor: expose parser as CJS export

* test(prettier): add long expression

* refactor(prettier): use Astro parser + built-in prettier doc for prettier plugin

* chore: remove parser from git

* chore: add prettier-plugin-astro `build` to workflow

* chore: update package-lock

* chore: do not build prettier-plugin-astro

* fix: update engines

* chore: remove NPM restriction

* chore: fix workflow paths

* chore: update build script

* test: fix prettier expr test

* chore: fix parser build on windows

* refactor: add parser tsconfig, extending base config

* chore: relax ban-ts-comment

* chore: fix lint issue

Co-authored-by: Nate Moore <nate@skypack.dev>
2021-04-21 11:14:44 -05:00
Matthew Phillips
58c499dc85
Pass mode into snowpack runtime (#99)
* 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-16 13:15:27 -04:00
Nate Moore
22ca9e0aac
Support children inside of components (#72)
* 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-15 10:55:50 -05:00
duncanhealy
687ff5bacd
chore fix lint reduce errors generated (#83)
* 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-12 16:20:58 +01:00
Matthew Phillips
cffde0192b
Add back in astro as a dependency of the snowpack example (#81)
Removing the dependency breaks the site as using Markdown creates an import to a builtin Astro component. So we need astro as a dep. Not sure why it was changed anyways.
2021-04-12 08:26:59 -04:00
Matthew Phillips
72ae661e9e
Add support for syntax highlighting of code blocks (#65)
* 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-08 15:17:00 -04:00
Drew Powers
b58b493948
Fix body from being scoped (#56) 2021-04-02 12:50:30 -06:00
Drew Powers
7334a550d8
Fix nested parens bug (#39) 2021-03-30 10:37:04 -06:00
Drew Powers
ee6ef81cf3
Convert CSS Modules to scoped styles (#38)
* 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 10:11:21 -06:00
Drew Powers
3ddd3594f0
Absorb Snowpack config inside Astro (#32)
* Absorb Snowpack config inside Astro

* Add basic README

* Format tests

* Update esbuild

* Format tests
2021-03-26 13:14:32 -06:00
Fred K. Schott
5492a2dc4e update package-lock 2021-03-23 19:45:03 -07:00
Drew Powers
e0353d50e7 Use <style lang>, add node_module resolution to Sass 2021-03-23 13:18:14 -06:00
Matthew Phillips
854d0feb34
Add support for React components. (#18)
* Add support for React components.

This adds support for react components via a new `extensions` config in astro.config.mjs. In the future we can extend this to do things like look at the import statements, as Snowpack does.

* Fix the tests
2021-03-23 13:47:54 -04:00
Drew Powers
1fdc1c799a
[wip] Add styles to Snowpack app (#13)
* Add styles to Snowpack app

* Bubble up file build errors

* Fix merge error
2021-03-22 18:06:58 -06:00
Matthew Phillips
2082001ff8
Add snowpack as an example project. (#11)
* Initial tests set up

This adds tests using uvu (we can switch if people want) and restructures things a bit so that it's easier to test.

Like in snowpack you set up a little project. In our tests you can say:

```js
const result = await runtime.load('/blog/hello-world')
```

And analyze the result. I included a `test-helpers.js` which has a function that will turn HTML into a cheerio instance, for inspecting the result HTML.

* Bring snowpack example in

* Formatting
2021-03-19 17:17:38 -04:00