Skip to content

Commit

Permalink
feat(planner/nodejs): Add nuejs support (zeabur#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelYuhe authored Sep 18, 2023
1 parent ab979a4 commit 41821e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/nodejs/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ func DetermineProjectFramework(ctx *nodePlanContext) types.NodeProjectFramework
return framework
}

if _, isNuejs := packageJSON.Dependencies["nuejs-core"]; isNuejs {
*fw = optional.Some(types.NodeProjectFrameworkNueJs)
return fw.Unwrap()
}

if _, isAstro := packageJSON.Dependencies["astro"]; isAstro {
if _, isAstroSSR := packageJSON.Dependencies["@astrojs/node"]; isAstroSSR {
*fw = optional.Some(types.NodeProjectFrameworkAstroSSR)
Expand Down
1 change: 1 addition & 0 deletions pkg/types/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const (
NodeProjectFrameworkSolidStart NodeProjectFramework = "solid-start"
NodeProjectFrameworkSolidStartNode NodeProjectFramework = "solid-start-node"
NodeProjectFrameworkSolidStartStatic NodeProjectFramework = "solid-start-static"
NodeProjectFrameworkNueJs NodeProjectFramework = "nuejs"
)

//revive:enable:exported
Expand Down

0 comments on commit 41821e8

Please sign in to comment.