Commit graph

123 commits

Author SHA1 Message Date
Nate Moore
9e7a1cbd7f TEMP: remove react from create-astro deps 2021-05-26 18:39:19 -05:00
Drew Powers
75bfc019aa
Fix npm init astro for npm v7 (#257)
Fixes #183
2021-05-26 14:17:50 -06:00
Nate Moore
643c880f28
Renderer plugins (#231)
* refactor: pluggable renderers

* refactor: cache renderer per component

* docs: update comments on snowpack plugin `transform` method

* docs: add comments to renderer plugins

* refactor: convert components to Map

* fix: pass children through to astro __render

* refactor: move Components/ComponentInfo to shared types

* refactor: remove `gatherRuntimes` step, just scan output for imports

* refactor: update isComponentTag logic

* chore: move dependencies to renderers

* fix: cross-platform transform injection

* feat: defer renderer to react, fallback to preact

* fix: use double quotes in generated script

* test: fix failing children tests

* test: add workspaceRoot to all tests

* fix: pass props to renderer check

* chore: add test:core script back for convenience

* chore: remove unused external

* chore: rename renderers

* chore: add astring, estree-util-value-to-estree

* chore: render-component => __astro_component

* refactor: split hydrate logic to own file

* refactor: use `astro-fragment` rather than `div`

* chore: remove unused hooks

* chore: delete unused file

* chore: add changesets

* fix: Astro renderer should be async

* fix: remove <astro-fragment> for static content

* test: fix failing test

* chore: normalize config interface

* feat: allow renderers to inject a snowpackPlugin

* fix: resolve import URL before using dynamic import

* refactor: update renderers to use separate /server entrypoint

* refactor: update server renderer interface

* fix: get renderers working again

* test: debug failing test

* test: better debug

* test: better debug

* test: remove debug

* fix: support esm and cjs packages via "resolve"

* refactor: split hydrate functions into individual files

* fix: dependency resolution relative to projectRoot

* fix: @snowpack/plugin-postcss needs to be hoisted

* fix: do not test prettier-plugin-astro as it's not ready for primetime
2021-05-26 13:30:22 -05:00
木杉
760a7a5509
Support skip install deps (#242)
* Support skip install deps

* fmt

* Create new-hats-deliver.md

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2021-05-25 17:16:49 -05:00
Nate Moore
9cdada0bcc
Markdown issue cleanup (#224)
* fix: markdown issues

* chore: add changeset

* chore: add missing dep

* perf: parallelize compileHtml for children
2021-05-21 15:52:20 -05:00
Drew Powers
19e20f2c54
Add Tailwind support to Astro Dev Server (#222)
* Improve PostCSS and Tailwind support

* Update styling docs

* Changelog

* Fix test hanging
2021-05-21 14:02:19 -06:00
Nate Moore
d8a78298f3
chore: add publish script to vscode (#216) 2021-05-17 13:29:51 -05:00
Matthew Phillips
c3c96bf498
Adds CSS completions to VSCode extension (#214)
* Start on css completion

* Support for CSS completions
2021-05-17 14:27:24 -04:00
Nate Moore
b3886c206f
Fix markdown issues (#208)
* Init fix/markdown

* Astro Markdown (#207)

* Add Astro Markdown to VSCode Extension

* Add Astro Markdown to Astro

* refactor: update astro-markdown example

* feat: remove embedded components from `.md` files

* fix: resolve `.md.astro` files at runtime

* chore: update markdown tests

* feat: add <Markdown> component

* chore: bump examples

* chore: update example

* fix: improve Markdown child handling

* feat: harden markdown support, add code fence support, add automatic dedenting

* chore: add weird markdown edge cases

* chore: update remote-markdown examples

* chore: add comment to Markdown.astro

* feat: improve markdown support (codefences, nested inside HTML)

* refactor: extract import specifier types to set

* refactor: conditionally import markdown renderer

* refactor: revert special-cased "astro/components"

* refactor: revert special-cased "astro/components"

* refactor: use astro/components/Markdown.astro

* refactor: remove `.md.astro` support in favor of Markdown component

* refactor: use regular .astro files

* refactor: remove unused code

* refactor: move Markdown inside Layout

* wip: markdown scoped styles

* feat: improve scoped styles in Markdown

* feat: micromark => remark ecosystem

* fix: markdown build

* fix: markdown build

* chore: add todo

* fix: collect headers text

* docs: add Markdown doc

* chore: add changeset

* docs: improve Markdown highlighting

* refactor: prefer Set

* refactor: exclude large unified deps

* docs: update markdown docs

Co-authored-by: Jonathan Neal <jonathantneal@hotmail.com>

* chore: remove extra markdown deps

* perf: optimize markdown

* fix: unified/rehype deps

* temp: fix markdown test

* test: add TODO comment

* fix: do not namespace frontmatter, just astro metadata

* test: fix astro-markdown test

* test: add realworld markdown example

* fix: prism language bug

* docs: update markdown docs

* chore: bump dependencies

* fix: escape codespan

* fix: unterminated string literal

* fix(vscode): inline dependencies

* fix(vscode): dependencies

* feat(vscode): embedded markdown

* feat: add Markdown syntax highlighting

* chore: improve markdown example

* fix: markdown example

* feat: highlighting improvements

* chore: add changeset

* fix: CodeBlock => CodeSpan

* chore: get astro-markdown example running

Co-authored-by: Jonathan Neal <jonathantneal@hotmail.com>
2021-05-17 09:29:16 -05:00
Drew Powers
9d092b56c7
Fix Windows tests (#212)
* Fix Windows fetchContent()

* Fix Windows bundling & config loading

* Fix astro-prettier formatting for Windows
2021-05-14 12:03:41 -04:00
Nate Moore
7a3e1c2d4c chore: release astro-vscode 2021-05-13 14:12:45 -05:00
Matthew Phillips
06e2597dd9
Support for import suggestions in the languageserver (#204)
* Support for import suggestions in the languageserver

https://www.loom.com/share/21921be3ebd1403aa4aaa4f39587efdb

* Add the changeset
2021-05-13 11:26:40 -04:00
Drew Powers
3ef1b01e14
[wip] Fix CI (#202)
* Yarn format

* Fix changeset --since

* Fix Windows tests
2021-05-12 12:06:16 -06:00
Drew Powers
b81abd5b2c
Add CSS bundling (#172)
* Add CSS bundling

* Add Changeset

* Update build script

* Count better

* Fix stats

* Cleanup

* Add test

* Show profile ms under 750ms
2021-05-06 10:38:53 -06:00
Nate Moore
64f4f74fb6
Split out astro-languageserver and astro-vscode (#173) 2021-05-05 12:44:31 -05:00
Nate Moore
3ad0aac8cf
Fix fetchContent for nested files (#171)
* fix: fetchContent within nested folders

* feat: add `sourceId` to fetchContent

* test: update collection tests

* fix: windows compat for importPath

* chore: add changeset

* fix: astroRoot => projectRoot

* feat: add `slash` package

* chore: remove sourceId prop

* chore: update changeset

* format
2021-05-04 17:11:05 -05:00
Matthew Phillips
0054f78e42
Add bundle size information to the build output (#169) 2021-05-04 14:06:38 -04:00
Drew Powers
94038d3297
Format (#167) 2021-05-03 12:26:10 -06:00
Nate Moore
c93201a909
Refactor astro export map, add source-map-support (#161)
* fix: add svelte plugin for esbuild, remove precompiled svelte components

* refactor: public export map, public types

* feat: add source-map-support to common code paths

* chore: move new "exports" to "imports" map, add internal types

* Include outPath in error logging for bad load status, and drop error stack (#163)

* Include outPath in the error logging for bad load status

* Discard error stack since it seems not useful

* feat: improve build error logging

* refactor: use object param for writeResult

Co-authored-by: Kevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com>
2021-05-03 13:18:08 -05:00
Drew Powers
4ff3add50f
Clean dependencies (#166)
* Clean dependencies

This moves some dependencies around where they should be

* Formatting
2021-05-03 11:47:51 -06:00
Nate Moore
c74f3e70f1
Adds .editorconfig file (#162)
* chore: adds .editorconfig file

* chore: move devDeps to root
2021-05-03 12:41:39 -05:00
Nate Moore
ed631329e7
create-astro UI (#164)
* refactor: improve create-astro layout, build script

* feat(create-astro): v0.1.0

* docs(create-astro): add README

* feat(create-astro): add meta files to starter templates
2021-05-03 12:15:13 -05:00
Nate Moore
4df1347156
Migrate to yarn monorepo (#157)
* chore: use monorepo

* chore: scaffold astro-scripts

* chore: move tests inside packages/astro

* chore: refactor tests, add scripts

* chore: move parser to own module

* chore: move runtime to packages/astro

* fix: move parser to own package

* test: fix prettier-plugin-astro tests

* fix: tests

* chore: update package-lock

* chore: add changesets

* fix: cleanup examples

* fix: starter example

* chore: update changeset config

* chore: update changeset config

* chore: setup changeset release workflow

* chore: bump lockfiles

* chore: prism => astro-prism

* fix: tsc --emitDeclarationOnly

* chore: final cleanup, switch to yarn

* chore: add lerna

* chore: update workflows to yarn

* chore: update workflows

* chore: remove lint workflow

* chore: add astro-dev script

* chore: add symlinked README
2021-04-30 16:33:35 -05:00