Commit graph

457 commits

Author SHA1 Message Date
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
Fred K. Schott
37200eba7c
Update README.md 2021-06-13 14:30:39 -07:00
github-actions[bot]
416e8484b5
Version Packages (#402)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-06-12 11:36:31 -07:00
Drew Powers
c374a549b5
Allow createCollection() to fetch remote data (#400)
* Allow createCollection() to fetch remote data

Fixes #378

* Update docs

* revert isomorphic-fetch, see if ci passes

Co-authored-by: Fred K. Schott <fkschott@gmail.com>
2021-06-11 18:31:36 -07:00
duncanhealy
2d7abd3ab4
config: add snowpack workspace root to starter (#399) 2021-06-12 00:05:53 +01:00
Drew Powers
9d3cd49410
Improve templates test (#377) 2021-06-11 15:07:30 -06:00
matthewp
e7b5ad362c [ci] yarn format 2021-06-11 20:34:45 +00: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
duncanhealy
8d72862a98
update node min version to 14.15.1 for codesandbox (#395) 2021-06-11 16:29:31 -04:00
github-actions[bot]
e7eab4e9d9
Version Packages (#386)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-06-11 16:24:07 -04:00
matthewp
68c6bc7d76 [ci] yarn format 2021-06-11 19:56:31 +00:00
Laura Caroline
348d829e94
Fix/issue #385 (#392)
* Apply favicon to the docs template

* Fix Sidebar category headers aren't clickable

Fixes #385

* Improve Docs example documentation

* Fix Documentation List on getting started page
2021-06-11 15:55:13 -04:00
Drew Powers
fb02a482c3
Fix baseUrl passed to Snowpack (#391) 2021-06-11 11:36:41 -06:00
Drew Powers
61b5590b95
Pass Astro site to snowpack baseUrl (#384) 2021-06-11 10:57:32 -06:00
github-actions[bot]
6eacdbae42
Version Packages (#381)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-06-11 09:15:16 -04:00
matthewp
86694cb8b8 [ci] yarn format 2021-06-11 13:04:33 +00:00
Matthew Phillips
1bab906539
Remove second snowpack instance (#368)
* Remove second snowpack instance

* Document import.meta.env.SSR

* Remove unnecessary Promise.all
2021-06-11 09:03:22 -04:00
Matthew Phillips
ce9336115e
Document the minimum node version (#379)
* Document the minimum node version

* Adds the changeset
2021-06-11 09:03:06 -04:00
matthewp
cc5d000fdc [ci] yarn format 2021-06-10 18:11:17 +00:00