docs/1.x/examples/using-fresh-canary-version.md
Pretend you have a use case where you need to modify your project to use a canary version of Fresh. Or you want to use a slightly different initialization script. This page has you covered.
deno.jsonThe easiest way to use Fresh 2 canary is with the update command:
deno run -A -r jsr:@fresh/[email protected] .
This will automatically update your deno.json to use the specified canary
version.
If you need a particular commit (for testing specific fixes or features):
"tasks": {
"update": "deno run -A -r jsr:@fresh/update ."
},
"imports": {
- "$fresh/": "jsr:@fresh/core@^2.0.0",
+ "$fresh/": "https://raw.githubusercontent.com/denoland/fresh/your-commit-hash/",
"preact": "npm:preact@^10.26.9",
"@preact/signals": "npm:@preact/signals@^2.2.0"
}
Replace your-commit-hash with your desired commit hash.
For testing your own fork or PR:
"tasks": {
"update": "deno run -A -r jsr:@fresh/update ."
},
"imports": {
- "$fresh/": "https://deno.land/x/[email protected]/",
+ "$fresh/": "https://raw.githubusercontent.com/your-username/fresh/your-branch/",
"preact": "https://esm.sh/[email protected]",
"preact/": "https://esm.sh/[email protected]/",
}
deno run -A -r jsr:@fresh/[email protected]
If you're developing Fresh itself:
deno run -A -r ./init/src/init.ts