You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
I guess this one is user-defined just like the build script for npm/pnpm/yarn/bun run build. Would Deno use the script from package.json that create-astro generates or do users need to define the same astro build on something from Deno?
build is required; it’s the Deno-side equivalent of npm run build.
For Astro we usually point it at the CLI via Deno’s npm compatibility layer:
{
"tasks": {
"build": "npm:astro build"
}
}
When you scaffold a new site with create-astro --deno (incoming PR), those two tasks will be added automatically, so users won’t have to think about them.
Why not reuse the package.json script?
A pure-Deno project typically has no package.json at all, so deferring to deno task keeps everything in one place and lets us skip Node setup entirely. Deno resolves the npm: specifier internally, so we still get the real Astro CLI without needing npm install.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
I guess this one is user-defined just like the
build
script fornpm/pnpm/yarn/bun run build
. Would Deno use the script frompackage.json
thatcreate-astro
generates or do users need to define the sameastro build
on something from Deno?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.
Hi @Fryuni,
build
is required; it’s the Deno-side equivalent ofnpm run build
.create-astro --deno
(incoming PR), those two tasks will be added automatically, so users won’t have to think about them.Why not reuse the
package.json
script?A pure-Deno project typically has no
package.json
at all, so deferring todeno task
keeps everything in one place and lets us skip Node setup entirely. Deno resolves thenpm:
specifier internally, so we still get the real Astro CLI without needingnpm install
.