如何在X $ C $ç构建阶段运行咕噜任务是什么? [英] How to run Grunt tasks during Xcode build phase?

查看:140
本文介绍了如何在X $ C $ç构建阶段运行咕噜任务是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个Web应用程序,其中包括建立GruntJS任务。我在X code IDE中使用的PhoneGap /科尔多瓦部署。

I am developing a web application, which includes GruntJS build tasks. I deploy it using Phonegap/Cordova in the Xcode IDE.

我想繁重的构建过程融入我的X code项目,以简化运行项目。理想的情况是X code必须运行的一切,我手动调用事先用咕噜CLI的过程。

I would like to integrate the grunt build process into my Xcode project to simplify running the project. Ideally Xcode should run all the processes that I manually invoke using the Grunt CLI beforehand.

我Gruntfile.js位于根X code ++项目目录中。我有一个本地安装咕噜(0.4.0rc4)在全球的装机量node_modules和咕噜-CLI。

My Gruntfile.js lies within the root Xcode project directory. I have a local grunt install (0.4.0rc4) in node_modules and grunt-cli installed globally.

project
- multiple project dirs ...
- node_modules
- www-src
- www
  project.xcodeproj
  Gruntfile.js

我曾尝试添加自定义运行脚本 - 建立阶段用的咕噜那样简单的命令返回我的X code项目:生成过程中咕噜命令未找到。显然还需要更多的努力来引用咕噜和/或适当的目标目录。

I have tried adding a custom Run script - build phase to my Xcode project with a command as simple as "grunt" which returns "grunt: command not found" during build. Clearly more effort is needed to reference grunt and/or the proper target directory.

推荐答案

不错的设置格雷戈尔:-)我有我的previous项目完全相同的设置。下面是我在安装X $ C $Ç我的自定义脚本构建阶段:

Nice setup Gregor :-) I had exact same setup for my previous project. Here is how I setup my custom script in Xcode Build Phases:

cd "${PROJECT_DIR}"
PATH=${PATH}:/usr/local/bin
grunt

希望这可以帮助你: - )

Hope this helps you :-)

这篇关于如何在X $ C $ç构建阶段运行咕噜任务是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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