[英]Ng Build an Angular 7 Project in IntelliJ Webstorm or IDEA
How do I build an Angular CLI project in IntelliJ IDEA or Webstorm?如何在 IntelliJ IDEA 或 Webstorm 中构建 Angular CLI 项目? I want an option to run
ng build
command for my Angular 7 Project, instead of running it through the command prompt.我想要一个选项来为我的 Angular 7 项目运行
ng build
命令,而不是通过命令提示符运行它。
To run ng build
, open your package.json
in IDEA (WebStorm) editor and press the run icon in the gutter to the left of the 'build"
script:要运行
ng build
,请在 IDEA (WebStorm) 编辑器中打开package.json
并按'build"
脚本左侧装订线中的运行图标:
To run ng serve
, run "start"
script.要运行
ng serve
,请运行"start"
脚本。 Note that the IDE auto-creates the Angular CLI Server run configuration for running ng serve
, you can use it to start the app.请注意,IDE 会自动创建用于运行
ng serve
的Angular CLI 服务器运行配置,您可以使用它来启动应用程序。
See also https://blog.jetbrains.com/webstorm/2017/01/debugging-angular-apps/ - you may find this blog post helpful另请参阅https://blog.jetbrains.com/webstorm/2017/01/debugging-angular-apps/ - 您可能会发现这篇博文很有帮助
If you open up Webstorm and have alook at the top right hand side of the page you will find a dropdown saying, Angular CLI Server
.如果您打开 Webstorm 并查看页面的右上角,您会发现一个下拉菜单,上面写着
Angular CLI Server
。 Click on the dropdown and click on Edit Configuration
.单击下拉菜单,然后单击
Edit Configuration
。
Once you have done the above you are going to end up at this window完成上述操作后,您将在此窗口中结束
.
.
Once you have that window open change the Scripts
to build
.打开该窗口后,将
Scripts
更改为build
。 Once you have done that you can run the Angular application normally with the green Run button at the top right of your screen完成后,您可以使用屏幕右上角的绿色运行按钮正常运行 Angular 应用程序
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.