lumeland / lume.land

The website of lume.land
https://lume.land
MIT License
68 stars 65 forks source link

fix: add typescript types #93

Closed scarf005 closed 7 months ago

scarf005 commented 7 months ago

Summary

Screenshots

Modules

image

JSX/TSX

image

netlify[bot] commented 7 months ago

Deploy Preview for lumeland ready!

Name Link
Latest commit a15d6bee9fc8fd31eca6795900528d73607dcb28
Latest deploy log https://app.netlify.com/sites/lumeland/deploys/6578213b1b80c7000879703e
Deploy Preview https://deploy-preview-93--lumeland.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

oscarotero commented 7 months ago

Hey, thanks for this! But the types in Lume 2 works in different way. lume/core.ts no longer exist, and lume/types.ts is automatically loaded by Deno (using the deno.json config file).

The page data is in Lume.Data and the helpers Lume.Helpers. For example:

export default function (data: Lume.Data, helpers: Lume.Helpers) {
  // Here the code
}
scarf005 commented 7 months ago

Oh, I didn't know that! Changed the types accordingly.

oscarotero commented 7 months ago

Sorry, I approved the changes but looking at the Deploy preview (https://deploy-preview-93--lumeland.netlify.app/plugins/jsx/), some code tabs are not rendered properly. I think it's because some tags are not closed.

I also think that having both jsx and tsx versions is a bit confusing, because there are two pages and two layouts. I'd keep only one version (TSX) and remove the JSX version.

scarf005 commented 7 months ago

sure, i'll only keep tsx files.

oscarotero commented 7 months ago

Thank you!