-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add deno example #678
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 6ff5ff9:
|
Neat! I've pushed some slight changes to use npm specifiers, this way there's no need for import maps.
Yes, committing it is a good call as it stores and checks subresource integrity. There are no lock files in the other examples because they're all in the |
@sarahdayan I forgot about the npm specifier, thanks! That is cleaner. |
@johnhooks Not natively. We need to use a I think it's fine not to do it. |
One thing to figure out before moving on though is how to make this example play ball with Ship.js and Lerna. When releasing a new version with Ship.js, once the new version is selected, Lerna runs to update the version of the library everywhere including in the examples (in the This won't work out of the box with the Deno example, as I don't think it supports Deno at all. Maybe one lead is to use relative dependencies instead of npm specifiers? |
That works if someone downloads the whole repo, but it is confusing if a beginner uses the example as an "example" and copy and pastes. Maybe relative imports, details in the README.md, a docs page about importing in Deno, and a preemptive GitHub issue or discussion could help solve possible confusion. |
@johnhooks I hoped we could use range versions ( Another route would be to update this script to update the versions in the example and re-compile the lock file. |
But the lockfile won't update until the packages are published because the aren't available... right? |
I tried the range version with I like the changes you made. |
@johnhooks A simple way to make it work right now could be to leverage the The |
What I was referring to was the lock file specifically. Unless you want to manually edit it, it can't be updated until after the packages are released. It can probably be cleaned up with a script, but ship.js doesn't have a |
I forgot that there's sub-resource integrity here 🤦 Another solution is to remove the lock file and exclude it from version control. Users can build it locally. It's only an example, this isn't that big of a deal. |
I think that is simplest |
@johnhooks That works for me, this way we can settle this PR. |
b5e41ab
to
17a9be4
Compare
@sarahdayan I removed the lock file and rebased to main. It should be ready. EDIT: Other than it doesn't pass the type check anymore. 77e7f52 added type checking to examples. The |
@johnhooks Yes let's ignore this example for now. I couldn't find anything related to it in the Deno docs, and I believe npm specifiers are still quite experimental so let's move forward. |
@sarahdayan It should be good now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go Deno 🚀
I've been playing with using Dinero.js with Deno. It requires using an import map. I thought an example might be helpful.
I will need to figure out how to change the version numbers in the
import_map.json
. I also don't know if for the example thedeno.lock
file should be committed.The example has the exact same contents as
example/starter
.