0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
Commit graph

6040 commits

Author SHA1 Message Date
Drew Powers
aa333c2f29
Add Tailwind support (#57) 2021-04-02 19:23:30 -06:00
Drew Powers
b58b493948
Fix body from being scoped (#56) 2021-04-02 12:50:30 -06:00
Drew Powers
004b3ea6a0
Fix React import (#55)
* Fix React import

* Change default export

* Fix :visible dynamic component

* Use colon to alias vue createElement

Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2021-04-02 14:48:41 -04:00
Drew Powers
5a1f422883
Move devDeps to deps (#54) 2021-04-02 11:04:48 -06:00
Drew Powers
003b3c395f
Get CSS Modules working in Vue (#53) 2021-04-02 10:16:16 -06:00
Matthew Phillips
2646f800af
Remove errant console.log (#51) 2021-04-01 16:57:32 -04:00
matthewp
1d73883469 [ci] npm run format 2021-04-01 20:34:51 +00:00
Matthew Phillips
54ba9f5ee1
Fix complex MDX parsing (#50)
* Fix complex MDX parsing

This allows fully MDX support using the micromark MDX extension. One caveat is that if you do something like use the less than sign, you need to escape it because the parser expects these to be tags otherwise.

* Move micromark definition
2021-04-01 16:34:11 -04:00
Matthew Phillips
397b7145cc
Add prism and skeleton www page (#49)
* Add prism and skeleton www page

This adds a Prism plugin, a Prism component, and the skeleton of our www site (just for testing the Prism component at the moment).

* Remove debugging
2021-04-01 15:16:29 -04:00
Drew Powers
c26c244ca2
Annoying Lint PR #2 (#47) 2021-04-01 10:25:28 -06:00
Drew Powers
f6a7ac67be
Add runtime mode (#48) 2021-04-01 10:20:57 -06:00
Matthew Phillips
7c10d563f2
Implements import.meta.request (#46)
This adds `import.meta.request` to pages (not components).
2021-03-31 16:47:03 -04:00
Matthew Phillips
d5b15a3851
Support for custom elements (#45)
* Support for custom elements

Now you can use custom elements like so in Astro components:

```html
<script type="module" src="./datepicker.js">
<date-picker></date-picker>
```

These will be resolve relative to the current astro component. In the build these modules are run through the same bundle/minify process as components.

* Remove component from public

* Formatting

* Disable empty fn rule
2021-03-31 16:46:09 -04:00
Matthew Phillips
d9084ff4ad
Implement fallback capability (#44)
* Implement fallback capability

This makes it possible for a dynamic component to render fallback content on the server.

The mechanism is a special `static` prop passed to the component. If `static` is true then the component knows it can render static content.

Putting aside the word `static`, is this the right approach? I think giving components the flexibility to make the decision themselves *is* the right approach.

However in this case we have a special property that is passed in non-explicitly. I think we have to do it this way because if the caller passes in a prop it will get serialized and appear on the client. By making this something we *add* during rendering, it only happens on the server (and only when using `:load`).

Assuming this is the right approach, is `static` the right name for this prop? Other candidates:

* `server`

That's all I have!

* Use `import.meta.env.astro` to tell if running in SSR mode.

* Run formatter
2021-03-31 16:10:27 -04:00
Drew Powers
3fa6396a7b
Extract Astro styles to external stylesheets (#43)
* Extract Astro styles to external stylesheets

* Require relative URLs in Markdown layouts
2021-03-31 13:04:18 -06:00
Fred K. Schott
a3b20a9aff remove unused fn 2021-03-30 17:06:13 -07:00
matthewp
da6ad7a5ed [ci] npm run format 2021-03-30 20:07:48 +00:00
Matthew Phillips
3e82a0052d
Add minification (#42) 2021-03-30 16:07:12 -04:00
Fred K. Schott
1c0590aeff simplify svg animation, slow it down 2021-03-30 12:13:56 -07:00
matthewp
f7603e0097 [ci] npm run format 2021-03-30 19:07:17 +00:00
Matthew Phillips
4a732837cd
Resolve component URLs during compilation (#40)
Previously dynamic component URLs were being resolved client-side in a weird way that only worked during dev. This change makes them handle during compilation, so it works in both (and improves readability of the dynamic import output).
2021-03-30 15:06:43 -04: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
matthewp
d267fa461b [ci] npm run format 2021-03-30 14:52:09 +00:00
Matthew Phillips
3b27eaac43
Add support for doctype (#37)
* Add support for doctype

* Automatically prepend doctype
2021-03-30 10:51:31 -04:00
matthewp
dbd764bdeb [ci] npm run format 2021-03-30 13:24:54 +00:00
Matthew Phillips
a79f7d4077
Bundling! 🤘 (#36)
* Bundling! 🤘

* Finalize build changes
2021-03-30 09:24:26 -04:00
Fred K. Schott
f11fd265f8 revert bad snowpack example changes 2021-03-29 13:48:27 -07:00
Fred K. Schott
d2d0ddad82 update landing page 2021-03-29 11:33:14 -07:00
Fred K. Schott
33c7b953b5 update site title 2021-03-29 10:46:35 -07:00
Fred K. Schott
ae8840bf8f clean up landing page 2021-03-29 10:43:46 -07:00
Fred K. Schott
4ff1822bb9 add example www site 2021-03-29 08:43:38 -07:00
Nate Moore
9ab1f52a1c
New hydration methods (#29)
* WIP: new hydration methods

* refactor: genericize load/idle/visible renderers

* fix: do not pass "data-astro-id" to component

* docs: add hydration section to README

* docs: update README

Co-authored-by: Nate Moore <nate@skypack.dev>
2021-03-26 17:09:28 -05:00
Drew Powers
202973291f
Add PR Template (#34)
* Add Auto-format action

* Add PR template
2021-03-26 14:03:07 -06:00
Drew Powers
88df57e690
Add SSR Styles test (#35) 2021-03-26 13:59:41 -06:00
drwpow
b92b9f66e5 [ci] npm run format 2021-03-26 19:46:26 +00:00
Drew Powers
7def0463b1
Add Auto-format action (#33) 2021-03-26 13:45:53 -06:00
Drew Powers
c7b03776ee
Fix JSX CSS Modules classes (#31) 2021-03-26 13:26:36 -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
Drew Powers
11637df579
Improve styles (#30) 2021-03-25 18:23:45 -06:00
Drew Powers
04a443a888
Add React component SSR (#28)
* Add React component SSR

* Add React component SSR
2021-03-25 16:59:38 -06:00
Matthew Phillips
3db5959377
First pass at the build (#27)
This updates `astro build` to do a production build. It works! No optimizations yet.
2021-03-25 14:06:08 -04:00
Nate Moore
18e7cc5af9
Scaffold language server (#25)
* wip: scaffold astro extension

* wip: scaffold astro extension

* WIP: vscode extension

* fix: autoCloseBefore

* chore: update package.json

* fix: use tsx instead of plain ts

* chore: remove dist files

* chore: remove comments

* chore: cleanup package build process, switch build to esbuild

* refactor: use shared esbuild config

Co-authored-by: Nate Moore <nate@skypack.dev>
2021-03-25 10:38:17 -05:00
Fred K. Schott
30cccdf715
add component state, top-level await support (#26) 2021-03-25 00:00:22 -07:00
Fred K. Schott
a72ab10c62
Redesign pages, remove layout nesting (#24)
* wip

* new svelte-style prop declaration is working

* got it working!

* revert h changes

* format

* style lang update
2021-03-24 16:01:28 -07:00
Matthew Phillips
3c24faa8ca
hmx ☞ astro (#22)
This changes all hmx files to astro files and updates all code to not reference hmx any more.
2021-03-24 11:45:38 -04:00
Matthew Phillips
5c1cd5b1da
Fix snowpack test (#21)
Using the new `---` syntax, it must be at the top of the file. If it's not it will loop indefinitely.
2021-03-24 08:27:01 -04:00
Fred K. Schott
222e8e19c9 import regex 2021-03-23 20:32:53 -07:00
Fred K. Schott
638f48c2fc remove last script tag 2021-03-23 20:19:38 -07:00
Fred K. Schott
fee5e3064e fix typo 2021-03-23 20:17:45 -07:00