Commit graph

59 commits

Author SHA1 Message Date
Fred K. Schott
f67e8f5f55
New Collections API (#703)
* updated createCollection API

* Update examples/portfolio/src/pages/projects.astro

Co-authored-by: Caleb Jasik <calebjasik@jasik.xyz>

* Update docs/reference/api-reference.md

Co-authored-by: Caleb Jasik <calebjasik@jasik.xyz>

* fix(docs): collection doc typos (#758)

* keep cleaning up docs and adding tests

Co-authored-by: Caleb Jasik <calebjasik@jasik.xyz>
Co-authored-by: Mark Pinero <markspinero@gmail.com>
2021-07-21 07:11:57 -07:00
Fred K. Schott
56e945810c fix doc dir for monorepo 2021-07-15 14:33:06 -04:00
Mihkel Eidast
fb8bf7ec43
select random ports if defaults are taken (#695)
* select random port if default ports are taken

* add changeset
2021-07-14 16:00:21 -05:00
Matthew Phillips
e3182c7670
Add missing dependency (#676)
* Add missing dependency

* Adds a changset
2021-07-13 11:10:31 -04:00
Matthew Phillips
48851c9d25
Adds support for a Lit renderer (#665)
* Adds support for a Lit renderer

This adds `@astrojs/renderer-lit`. An experimental Lit renderer.

* Removed cached submodule, mistake

* Prevent globals clobbering

* Add docs on globals
2021-07-13 08:27:40 -04:00
Caleb Jasik
1b13f5c158
Add lang attribute to pages on https://astro.build (#668) 2021-07-12 20:20:52 -04:00
Nate Moore
7583a8b42a
Update build script to avoid bundling (#304)
* fix: simplify astro-scripts build

* fix: remove source-map-support, add missing `.js` extensions

* refactor: use `module` for `@astrojs/markdown-support`

* fix: missing `.js` extension

* fix: missed @astrojs/parser

* fix: remove old file

* fix: merge conflict

* fix: CJS weirdness
2021-07-12 17:01:33 -05:00
Matthew Phillips
f62973b5ca
Upgrade to snowpack@3.8.0 (#621)
* Upgrade to snowpack@3.8.0

* Try with 3.8.1-pre.0

* Newest yarn lock

* Add postcss plugin and autoprefixer to the root

* Update the yarn lock

* Prevent typescript recursion

* Use snowpack@3.8.1
2021-07-12 13:59:11 -04:00
Nate Moore
fb78b76cc6
Improve error handling in unsupported node versions (#649)
* feat: improve error handling for unsupported node versions

* chore: add changeset
2021-07-09 14:29:51 -05:00
Matthew Phillips
1e01251454
Use correct React rendering API or hydration (#636)
* Use correct React rendering API or hydration

* Add changeset
2021-07-09 09:00:32 -04:00
Caleb Jasik
53fcae1a9a
Remove prettier-plugin-astro to fix Prettier CI (#614)
* Disable embedded languages formatting so that Astro code blocks don't make prettier hang

* chore: remove prettier-plugin-astro

* chore: enable embedded languages

* chore: update yarn lock

Co-authored-by: Nate Moore <nate@skypack.dev>
2021-07-07 15:09:05 -05:00
Matthew Phillips
b9bd6875bb Update with changes to the yarn lock 2021-07-06 15:32:36 -04:00
Matthew Phillips
2d3e369da7
Don't alias builtins if polyfillNode is used (#601)
* Don't alias builtins if polyfillNode is used

* Add the changeset

* Make test be OS agnostic
2021-07-01 16:22:47 -04:00
Pavel Mineev
d3969436dc
Remark and rehype plugins (#562)
* remark plugins

* remove unused dependency

* enable codeblocks

* backward compatibility with remark-code-titles

* add support for rehype plugins

* add proper types for plugins

* fixes after review

- connect plugins by name
- make plugins configurable
- connect gfm and footnotes if no plugins provided from config
- add more plugins to example

* update and rename example

* add documentation for markdown plugins

* chore: rename with-markdown-plugins example

* chore: restructure dependencies

* feat: add back smartypants, fix mdx expressions

* chore: remove log

* test: add markdown plugin tests

* chore: add changeset

* docs: update markdown doc

Co-authored-by: Nate Moore <nate@skypack.dev>
2021-07-01 11:55:22 -05:00
Matthew Phillips
6a660f1b08
Implements low-level custom element support (#587)
* Implements low-level custom element support

* Changes based on self review

* Adds a changeset

* Polyfills are added even when not hydrating

* Remove hydrationMethod option

Punting on this idea until it's really needed.
2021-07-01 08:42:07 -04:00
Nate Moore
42a6ceb587
Fix changesets action (#576)
* chore: move examples to `@example/`, normalize `package.json`

* chore: update lockfile

* chore: add empty changeset
2021-06-29 11:05:33 -05:00
Matthew Phillips
8865158f7f
Upgrade postcss snowpack plugin (#547)
* Upgrade postcss snowpack plugin

* Increase the startup time more

* Add changeset
2021-06-25 15:12:10 -04:00
Matthew Phillips
52bf970d6e
Remove broken changeset (#542)
This changeset has "mixed ignored and not ignored change", whatever this means. This is a changeset for examples, which we don't publish, so its unnecessary.
2021-06-25 09:38:46 -04:00
Drew Powers
56293499e8
Fix PostCSS support upstream in Snowpack (#538)
Fixes #481
2021-06-24 17:49:42 -05:00
Matthew Phillips
e316c9578c
Allow usage of node builtins through node: prefix (#520)
* Start of allowing node builtins issue

* Allow use of node:builtin

* Produce an error in Astro files with bare builtin usage

* Upgrade snowpack version

bug fixes for packages that use `node:`

* Document node builtins

* Use the provided builtins list
2021-06-23 16:01:32 -04:00
Fred K. Schott
09b5779884
fix issues uncovered by snowpack warnings (#511)
* fix output issues uncovered by snowpack warnings

* Update the snowpack version

* Load Prism dep as the default

* Rename srcRoot to src

* Document the src option

* Add the changeset

Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2021-06-22 14:41:04 -04:00
Matthew Phillips
b547892411
Allow the head element to be optional (#447)
* First take

* Allow omitting head element

This makes it possible to omit the head element but still inject the style and HMR script into the right place.

* Add changeset

* More progress on this

* Only render if it's a page

* Include fragments in compiled jsx

* Adds a changeset
2021-06-21 12:28:30 -04:00
Matthew Phillips
233fbcd5c5
Fix race condition in build (#477)
* Fix race condition in build

* Add changeset
2021-06-16 17:24:25 -04:00
Matthew Phillips
2023a26725
Fix issue with proxy imports not reloading on change (#462)
Underlying issue fixed in Snowpack here: https://github.com/snowpackjs/snowpack/pull/3449
2021-06-16 08:35:09 -04:00
Kitto Khrangtong
7d719ff75d
Create initial docs site (#389)
* create initial docs site

* change copy for title and header to say Astro Docs

* create initial docs site

* remove text merge changes

* change workspaceRoot and remove yarn.lock from docs-www

* add docs-www to workspace

Co-authored-by: Kitto Khrangtong <kitto@queensboro.com>
2021-06-11 16:33:36 -04:00
Matthew Phillips
afa09ee9dc
Add HMR port script when needed (#375)
* Always add HMR port script when HMR is enabled

* Add it only if there are client side components

* Fix the test

* Add a test where HMR port not set

* Upgrade snowpack version

* Fix snowpack semver
2021-06-10 14:10:15 -04:00
Fred K. Schott
6bca7c83a7
redesign create-astro (#301)
* redesign create astro

* add changeset

* Use npm start

* Update the astro version

* Adds the changeset

Co-authored-by: Fred Schott <fks@Freds-MBP.attlocal.net>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2021-06-08 11:10:56 -04:00
Matthew Phillips
187020a9ab
Add support for astro file scanning (#320)
This upgrades to snowpack@3.5.6 which brings along astro file scanning
2021-06-07 16:41:02 -04:00
Nate Moore
cc532cddde
Fix Tailwind resolution (#314)
* fix: properly resolve tailwind postcss plugin

* chore: add changeset

* chore: update @snowpack/plugin-postcss
2021-06-07 15:04:07 -05:00
Matthew Phillips
b1364afbae
Prevent duplicate snowpack logs (#316)
* Prevent duplicate snowpack logs

* Fix test to wait on expected messages

* Update the snowpack/plugin-vue

* Add changeset

* Debugging

* Skip the logging test on windows :(

* arg
2021-06-07 14:24:55 -04:00
Matthew Phillips
50e6f491ad
Use npm package names to load internal deps (#294)
* Use npm package names to load internal deps

This is necessary so that published Astro components work. These components will be built by esinstall and therefore they cannot rely on `_astro_internal`. The fix is to use npm specifiers everywhere.

* Move most of frontend to internal

* Mark astro/internal/markdown.js as external

* Move markdown stuff to its own package

This moves the markdown stuff to its own package so that we can externalize it in the markdown component.

* Add the changeset
2021-06-04 14:19:01 -04:00
Nate Moore
c9d833ee0b
Fix prerelease bugs, reenable @astrojs/renderer-vue (#286)
* fix: add packages to external

* fix: improve renderer error message

* fix: reenable vue renderer

* chore: remove `extensions` from templates

* fix: reenable @astrojs/renderer-vue

* refactor: add types to snowpack plugin

* fix: update snowpack

* fix: use manual SSR wrapper for Svelte

* chore: add changesets

* chore: bump snowpack

* test: fix failing test

* chore: remove redundant entries
2021-06-01 18:41:08 -05:00
Nate Moore
4c0c5e6f85 chore: bump lockfile 2021-05-28 18:28:46 -05:00
Nate Moore
3df41d2308
Bugbash! (#263)
* fix(vscode): Markdown frontmatter should use TSX, not YAML

* test: add test for #153

* chore: bump deps

* chore: update to use @astrojs scope

* fix: Markdown parse error when only child is `{expression}`

* fix: update renderer edge cases

* fix: failing test

* fix: update renderer
2021-05-28 17:19:40 -05:00
Drew Powers
a0055bd985
Create astro fixes (#267)
* Remove create-astro from workspace

* Improve contrast ratio

* Swap blank template for blog template

* Remove counter components from blog template

* Use `latest` astro version
2021-05-28 10:06:22 -06:00
Nate Moore
19dc517b87 chore: update lockfile 2021-05-27 09:13:17 -05:00
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