feat: add plugin build command (#10935)

Fixes: FRMW-2863

Adds the `plugin:build` command that is used to compile the source code of a plugin for publishing it to a package registry. The command is similar to the `build` command, except it does not copy the `package.json` and the `lock` files to the build output
This commit is contained in:
Harminder Virk
2025-01-13 19:03:54 +05:30
committed by GitHub
parent b0cfb05bd1
commit b0f581cc7c
4 changed files with 89 additions and 3 deletions

View File

@@ -254,10 +254,20 @@ function buildLocalCommands(cli, isLocalProject) {
})
),
})
.command({
command: "plugin:build",
desc: "Build plugin source for publishing to a package registry",
handler: handlerP(
getCommandHandler("plugin/build", (args, cmd) => {
process.env.NODE_ENV = process.env.NODE_ENV || `development`
cmd(args)
return new Promise((resolve) => {})
})
),
})
.command({
command: "plugin:develop",
desc: "Start plugin development process in watch mode. Changes will be re-published to the local packages registry",
builder: (builder) => {},
handler: handlerP(
getCommandHandler("plugin/develop", (args, cmd) => {
process.env.NODE_ENV = process.env.NODE_ENV || `development`