Skip to content

extension add ​

为应用添加一个新的扩展

使用 ​

shell
Usage: nexus extension add [options]

选项 ​

shell
-v, --verbose            enable verbose mode
-t, --type <type>        extension type, e.g. pcm:pjm:project:page
-u, --ui-type <ui-type>  UI framework
                         (angular-custom-ui|javascript-custom-ui|react-custom-ui|vue-custom-ui|angular-native|react-native)
--dry-run                preview files to create/modify without writing to
                         disk
--force                  overwrite existing target files
--variables <json>       pass template variables non-interactively; implies
                         --non-interactive (requires -t)
--no-install             skip dependency installation
--non-interactive        run the command without input prompts
-h, --help               display help for command

示例 ​

交互式添加扩展

shell
nexus extension add

指定扩展和 UI 框架(非交互)

nexus extension add --non-interactive -t pcm:pjm:project:page -u react-custom-ui --no-install --variables '{"extensionKey":"demo-page","resourceKey":"demo-ui","title":"Demo Page","functionKey":"demo-resolver","route":"demo-route"}'

仅预览将要创建或修改的文件,不写入磁盘

nexus extension add --dry-run -t pcm:pjm:project:page -u react-custom-ui --variables '{"extensionKey":"demo-page","resourceKey":"demo-ui","title":"Demo Page","functionKey":"demo-resolver","route":"demo-route"}'

举报邮箱:abuse@worktile.com