Ionic的默认gulp文件如何与其cli工具相关联? [英] How does Ionic's default gulpfile relate to its cli tool?

查看:205
本文介绍了Ionic的默认gulp文件如何与其cli工具相关联?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我正在使用带有 ionic serve 的Chrome浏览器运行应用仿真。我也看到有一个与框架相关的gulpfile.js。离子和gulp之间的关系是什么?

.com / driftyco / ionic-cli#advanced-serve-optionsrel =nofollow> https://github.com/driftyco/ionic-cli#advanced-serve-options (请参阅Gulp Integrations )。



您可以在 ionic.project gulpStartupTasks 属性

上面的链接文档给出的例子是:

<$ p


$ b $ name b










$ $ b

在这种情况下,执行 watch gulp任务运行 $ ionic serve



如果运行 $ ionic setup sass ,它会将配置添加到 ionic.project 中。一旦你明白了这一点,只要你理解了一口气,你就会很开心。

Currently, I am running the app emulation using the Chrome browser with ionic serve. I also see that there is a gulpfile.js associated with the framework. What is the relationship between ionic and and gulp?

解决方案

Have a look at: https://github.com/driftyco/ionic-cli#advanced-serve-options (see "Gulp Integrations").

You can add a gulpStartupTasks property in the ionic.project file located in your project root.

They example the above linked documentation gives is:

{
  "name": "SmoothRiders",
   "gulpStartupTasks": [
    "watch"
  ]
}

In this case, the watch gulp task is executed when you run $ ionic serve.

If you run $ ionic setup sass, it will add the configuration to your ionic.project. Once you understand that, you're good to go so long as you understand gulp.

这篇关于Ionic的默认gulp文件如何与其cli工具相关联?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆