如何在 WebStorm 中添加 'custom' 个项目模板
How to add 'custom' project templates in WebStorm
正如标题所说,我的问题是如何在 WebStorm 中制作 'customizable' 项目模板。
我不是说像 Tools > Save Project as Template
,而是像 Vue/Angular/React 这样的默认模板,你可以在可以 define/give 参数的地方命名它,比如框架版本 X/Y或基于给定参数的不同代码块。
如果没有直接的方法可以做到这一点,也许有一种方法可以用插件来做到这一点,或者是否有一个开放的issue/request?
是的,可以通过插件添加自定义项目模板。查看相关论坛主题:
- https://intellij-support.jetbrains.com/hc/en-us/community/posts/360004365440-How-to-add-custom-project-template-to-intellij-plugin-
- https://intellij-support.jetbrains.com/hc/en-us/community/posts/206111059-Adding-a-project-template?page=1#community_comment_206674359
- https://intellij-support.jetbrains.com/hc/en-us/community/posts/206761085-Create-project-template-extensions-using-user-defined-templates#5529278
- https://intellij-support.jetbrains.com/hc/en-us/community/posts/206768385-create-a-new-project-type?page=1#community_comment_206128535)。
另请参阅 SDK docs 了解插件创建指南。
正如标题所说,我的问题是如何在 WebStorm 中制作 'customizable' 项目模板。
我不是说像 Tools > Save Project as Template
,而是像 Vue/Angular/React 这样的默认模板,你可以在可以 define/give 参数的地方命名它,比如框架版本 X/Y或基于给定参数的不同代码块。
如果没有直接的方法可以做到这一点,也许有一种方法可以用插件来做到这一点,或者是否有一个开放的issue/request?
是的,可以通过插件添加自定义项目模板。查看相关论坛主题:
- https://intellij-support.jetbrains.com/hc/en-us/community/posts/360004365440-How-to-add-custom-project-template-to-intellij-plugin-
- https://intellij-support.jetbrains.com/hc/en-us/community/posts/206111059-Adding-a-project-template?page=1#community_comment_206674359
- https://intellij-support.jetbrains.com/hc/en-us/community/posts/206761085-Create-project-template-extensions-using-user-defined-templates#5529278
- https://intellij-support.jetbrains.com/hc/en-us/community/posts/206768385-create-a-new-project-type?page=1#community_comment_206128535)。
另请参阅 SDK docs 了解插件创建指南。