-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a60d274
commit f783fa8
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package types | ||
|
||
type TemplateType int64 | ||
|
||
const ( | ||
BasicTemplate TemplateType = iota | ||
ReactTemplate // This is a vite template | ||
NextTemplate | ||
ViteLibraryModeTemplate | ||
ExpressTemplate | ||
) | ||
|
||
type Template interface { | ||
Template() TemplateType | ||
} | ||
|
||
type PackageManagerType int64 | ||
|
||
const ( | ||
Npm PackageManagerType = iota | ||
Yarn // This is a vite template | ||
Pnpm | ||
) | ||
|
||
type PackageManager interface { | ||
PackageManager() PackageManagerType | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module types | ||
|
||
go 1.17 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package types | ||
|
||
type PackageJSON struct { | ||
Name string `json:"name"` | ||
Dependencies map[string]string `json:"dependencies,omitempty"` | ||
DevDependencies map[string]string `json:"devDependencies,omitempty"` | ||
Scripts map[string]string `json:"scripts,omitempty"` | ||
Files []string `json:"files,omitempty"` | ||
Engines map[string]string `json:"engines,omitempty"` | ||
Main string `json:"main,omitempty"` | ||
Typings string `json:"typings,omitempty"` | ||
Husky map[string]map[string]string `json:"husky,omitempty"` | ||
Version string `json:"version,omitempty"` | ||
License string `json:"license,omitempty"` | ||
Module string `json:"module,omitempty"` | ||
Exports map[string]map[string]string `json:"exports,omitempty"` | ||
Prettier string `json:"prettier,omitempty"` | ||
TSDEV ProjectConfig `json:"tsdev,omitempty"` | ||
} | ||
|
||
type ProjectConfig struct { | ||
Template TemplateType `json:"template,omitempty"` | ||
PackageManager PackageManagerType `json:"packageManager,omitempty"` | ||
TailwindCss bool `json:"tailwindcss,omitempty"` | ||
} |