Commit graph

2425 commits

Author SHA1 Message Date
Nikhil Mehta
dce6a6ce61
docs: fixed ascii based folder strucure in dev.md (#461) 2021-06-16 08:19:57 -04:00
Nurettin Kaya
251b0b5c06
Less verbose HMR script (#457)
* Less verbose HMR script

* push changeset
2021-06-16 08:17:06 -04:00
Drew Powers
54c291efa0
Handle script module resolution (#438)
Fixes #104
2021-06-15 15:06:29 -06:00
Drew Powers
272769d723
Improve asset resolution in Astro (#437)
* Improve asset resolution in Astro

Fixes #96

* Add docs, changeset

* Fix collection resolution
2021-06-15 14:53:16 -06:00
Nate Moore
0c39c27ef5
docs: update syntax docs (#449) 2021-06-15 14:32:32 -05:00
Jasper Nykänen
e3ab36f914
Fix typo (#441) 2021-06-15 14:29:01 -05:00
Drew Powers
d14bfdc6c6
Clarify docs suggesting that Astro may just randomly break your styles (#451) 2021-06-15 11:26:24 -06:00
Jeffrey Jose
2462ece7a6
Add .svelte to the tailwind config (#444)
Add .svelte files to tailwind config so that svelte components can use tailwind classes.
2021-06-15 12:51:42 -04:00
natemoo-re
266e447e01 [ci] yarn format 2021-06-15 16:34:46 +00:00
Nate Moore
490f2bebbc
Add <> fragment support for expressions (#433)
* feat: add support for `<>` and `</>` Fragments

* docs: explain Fragments

* test: add fragment test
2021-06-15 11:33:27 -05:00
github-actions[bot]
28c2d74dc3
Version Packages (#446)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-06-15 08:25:29 -04:00
Matthew Phillips
9d4a40fccc Adding a changeset 2021-06-15 08:21:53 -04:00
FredKSchott
2ea15f4192 [ci] yarn format 2021-06-15 00:22:00 +00:00
Fred K. Schott
8399a4893e
new collections API docs (#416)
* new collections API docs

* docs updates

* Update docs/collections.md

Co-authored-by: Drew Powers <1369770+drwpow@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Drew Powers <1369770+drwpow@users.noreply.github.com>

* respond to code review

Co-authored-by: Drew Powers <1369770+drwpow@users.noreply.github.com>
2021-06-14 17:21:00 -07:00
matthewp
47e3ddc665 [ci] yarn format 2021-06-14 20:14:03 +00:00
github-actions[bot]
5222460719
Version Packages (#431)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-06-14 16:12:55 -04:00
matthewp
ddd86f8ab2 [ci] yarn format 2021-06-14 20:11:42 +00:00
Matthew Phillips
016833a3bc
Honor user's hmr settings (#436)
* Honor user's hmr settings

This contains 2 fixes:

* If the user sets the hmrPort in their own snowpack config we use that port.
* If the user sets `window.HMR_WEBSOCKET_URL` we defer to that

* Adds the changeset
2021-06-14 16:10:29 -04:00
matthewp
b49ca27b06 [ci] yarn format 2021-06-14 19:47:05 +00:00
Fred K. Schott
528886b76a
rewrite part of the renderer docs (#432) 2021-06-14 15:45:50 -04:00
Fred K. Schott
1437b42038
fix some example docs site issues (#434) 2021-06-14 15:45:33 -04:00
matthewp
40720b2c1e [ci] yarn format 2021-06-14 18:18:59 +00:00
Matthew Phillips
73a43d9301
Prevent postcss from crashing when scoping class without a body (#430)
* Prevent postcss from crashing when scoping class without a body

For some reason postcss will keep running the plugin over and over on a class without a body if we modify the `selector` (this triggers it as being "dirty"). It doesn't do this for selectors with a body. But the fix was easy enough, only scope a rule once.

Closes #340

* Add a changeset
2021-06-14 14:17:56 -04:00
github-actions[bot]
3d3d4cfe0b
Version Packages (#428)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-06-14 13:28:40 -04:00
Matthew Phillips
9f51e2d2f2 Add changeset for arrow function issue 2021-06-14 13:26:55 -04:00
Matthew Phillips
af03c90c2b
Fix usage of arrow functions as components (#426)
* Fix usage of arrow functions as components

This fixes the React and Preact component as arrow function use-case by checking for the prototype property (arrow functions don't)

* Check the prototype
2021-06-14 13:24:37 -04:00
github-actions[bot]
5602aabfe0
Version Packages (#425)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-06-14 12:54:33 -04:00
Brad Cornes
e0989c696a
Fix scoped CSS selector when class contains a colon (#383)
* fix scoped selector when using escaped colon

* update scoped styles test

* add changeset

* update `scopeRule` test

* update `scopeRule` test

* update css minifier to account for windows-style line breaks
2021-06-14 10:36:33 -06:00
Matthew Phillips
2d854092a4
Serialize boolean attributes without a value (#422)
* Serialize boolean attributes without a value

Fixes #307

* Update the attrs test

* Adds a changeset

* Adds test that components receive booleans
2021-06-14 12:29:34 -04:00
Matthew Phillips
42dee7978d
Adds a changeset for doctype change (#424) 2021-06-14 12:10:09 -04:00
matthewp
3db6914137 [ci] yarn format 2021-06-14 16:01:54 +00:00
Matthew Phillips
0b16b2ddd0
Make doctype be case insensitive (#419)
* Make doctype be case insensitive

Fixes #413

* Make doctype completely case insensitive

* Make check for style scoping doctype override be case insensitive

* Check for doctype in the right place
2021-06-14 12:00:51 -04:00
github-actions[bot]
0ef0c99b10
Version Packages (#418)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-06-14 08:43:03 -04:00
matthewp
a5d6e434ab [ci] yarn format 2021-06-14 12:36:32 +00:00
Matthew Phillips
271cfe6ce3
Improved JSX framework detection (#382)
* Improved JSX framework detection

This improves the JSX detection and adds a bunch of test. The following is improved:

* If an error throws because of a coding mistake, those errors will be reported.
* We properly detect class components for both Preact and React. We don't have to "try to render" these.

It's still possible that error messages might be obscured in this scenario:

A Preact function component that uses hooks (or another preact specific feature) that has a coding mistake. The React renderer might throw when it uses the Preact hook. That error will be reported rather than the real coding mistake.

This is because we can't distinguish between errors that are due to the wrong framework and errors that the user caused.

I might reach out to the Preact community and see if they can think of a better solution to this problem. This will come up when other JSX based frameworks have renderers. I still think that having multiple frameworks in the same project is a feature worth trying to preserve.

* Move try/catch into the __astro_component
2021-06-14 08:35:25 -04:00
Fred K. Schott
ab2972be83
add engines for esm support (#415) 2021-06-14 08:20:14 -04:00
Fred K. Schott
c74ba4bece
Update PULL_REQUEST_TEMPLATE.md 2021-06-13 15:53:41 -07:00
Fred K. Schott
9a3a7bc7e7
Delete ---framework---library-support.md 2021-06-13 15:51:21 -07:00
FredKSchott
fbe1493c1b [ci] yarn format 2021-06-13 22:44:26 +00:00
Fred K. Schott
2794765080 Update issue templates 2021-06-13 15:43:19 -07:00
Fred K. Schott
559c384987
Delete ---astro---your-favorite-tool.md 2021-06-13 15:22:02 -07:00
FredKSchott
82f5c48925 [ci] yarn format 2021-06-13 22:20:48 +00:00
Fred K. Schott
32161c3d7d Update issue templates 2021-06-13 15:19:38 -07:00
FredKSchott
a7de693652 [ci] yarn format 2021-06-13 22:18:11 +00:00
Fred K. Schott
aff84c1484 Update issue templates 2021-06-13 15:17:02 -07:00
FredKSchott
9a6cf9a9c4 [ci] yarn format 2021-06-13 22:04:02 +00:00
Fred K. Schott
962e7288e8 Update issue templates 2021-06-13 15:02:54 -07:00
FredKSchott
4d6946bdfb [ci] yarn format 2021-06-13 21:49:42 +00:00
Fred K. Schott
e1dd7848b9 Update issue templates 2021-06-13 14:48:43 -07:00
Fred K. Schott
2b91619fa5
Create config.yml 2021-06-13 14:40:22 -07:00