简体   繁体   English

适用于Ionic2和Angular2的最佳工作流程

[英]Best workflow for to work with Ionic2 and Angular2

I'm usually developing PHP backend apps. 我通常在开发PHP后端应用程序。 I'm developing on Windows and use Vagrant to create virtual machine. 我正在Windows上进行开发,并使用Vagrant创建虚拟机。

Workflow looks like that: 工作流程如下所示:

  1. On base machine I have all my project files and I'm using git. 在基本计算机上,我拥有所有项目文件,并且正在使用git。
  2. On base machine I have installed PhpStorm which is connected over ssh to virtual machine. 在基本计算机上,我安装了PhpStorm,它通过ssh连接到虚拟机。 PhpStorm is syncing files from base machine to local machine (in one direction)* using deployment. PhpStorm正在使用部署将文件从主机同步到本地计算机(在一个方向上)*。
  3. Every library and module like nodejs, ruby, gulp etc. I'm installing on virtual machine to not clutter my base machine. 每个库和模块(例如nodejs,ruby,gulp等)都安装在虚拟机上,以免干扰基础计算机。
  4. Debugging works fine - I can connect PhpStorm debugging over remote ssh. 调试正常-我可以通过远程ssh连接PhpStorm调试。

Almost everything it's fine with that workflow (sometimes I have to download some generated files on virtual machine), but that workflow is not the best for working with Ionic2 and Angular. 该工作流程几乎一切正常(有时我必须在虚拟机上下载一些生成的文件),但是该工作流程并不是使用Ionic2和Angular的最佳方法。

Ionic uses many nodejs modules -> this causing many problems in PhpStorm to hinting errors and code completion. Ionic使用了许多nodejs模块->这在PhpStorm中引起很多问题,提示错误和代码完成。 Second problem is debuging I can't connect typescript debugging from PhpStorm because all files all generated by gulp on virtual machine. 第二个问题是调试我无法连接PhpStorm的打字稿调试,因为所有文件都是由gulp在虚拟机上生成的。

My question is: 我的问题是:

  • What's is the best workflow when I want to work on windows with ionic2? 当我想使用ionic2在Windows上工作时,最好的工作流程是什么?
  • Do I have to install all libraries on Windows machine? 我必须在Windows机器上安装所有库吗?
  • Should I use shared folders for that project is any possibility to hinting in PhpStorm? 在PhpStorm中提示是否可以为该项目使用共享文件夹?

  • base machine - on Windows 基本计算机-在Windows上
  • virtual machine - on Ubuntu 14 Server LTS 虚拟机-在Ubuntu 14 Server LTS上
  • I can't use shared folders cause of slowly cache creating on PHP app and in general PHP apps running then very slowly, even if I moved cache folder to not shared folder on Ubuntu. 我无法使用共享文件夹,这会导致在PHP应用程序上创建缓存缓慢,并且通常运行的PHP应用程序运行得非常缓慢,即使我将缓存文件夹移至Ubuntu上的非共享文件夹也是如此。
  1. If you have Ionic CLI installed you can start new project by ionic start command. 如果安装了Ionic CLI,则可以通过ionic start命令启动新项目。 It provides you workflow with everything you can need. 它为您提供所需的一切工作流。 For example: 例如:

    $ ionic start cutePuppyPics --v2 //create new project $ cd cutePuppyPics $ ionic serve //start server, live reload etc.

  2. Yes, you should install it all on your non-virutal desktop, because if you want to test app on your device, it will be hard to link this device to ADB in your virtual machine. 是的,应该将其全部安装在非虚拟桌面上,因为如果要在设备上测试应用程序,则很难将该设备链接到虚拟机中的ADB。

  3. It works very well with PhpStorm :) 与PhpStorm一起使用效果很好:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM