mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
Adding workspace to npm which better integrates wails and frontend npm.
Running `npm install` will now run on the top level of a generated project and additionally the "frontend" workspace (we can add plugins for wails like this, auto update, package, sign, etc, etc) Other commands that use workspaces (including pre/post hooks mostly) and might be helpful to Wails are `docs`, `install`, `rebuild`, `publish`, `pkg`, `pack`, `ci` For example, during wails build, you could ask for data from the frontend/package.json to get version, title, etc with. `npm pkg get name version --workspace=frontend` Signed-off-by: Snider <snider@lt.hn>
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"postinstall": "npm run setup && cd frontend && npm install",
|
||||
"install": "go install github.com/wailsapp/wails/v2/cmd/wails@latest",
|
||||
"build": "wails build --clean",
|
||||
"build:macos": "npm run build -- --platform darwin/universal",
|
||||
"build:macos-arm": "npm run build -- --platform darwin/arm64",
|
||||
"build:macos-intel": "npm run build -- --platform darwin",
|
||||
"build:windows": "npm run build -- --platform windows/amd64",
|
||||
"setup": "go install github.com/wailsapp/wails/v2/cmd/wails@latest"
|
||||
}
|
||||
"build:windows": "npm run build -- --platform windows/amd64"
|
||||
},
|
||||
"workspaces": [
|
||||
"frontend"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user