我可以在我的 PHP 5.4 墨盒上运行 Grunt/Gulp 吗? [英] Can I run Grunt/Gulp on my PHP 5.4 cartridge?

查看:87
本文介绍了我可以在我的 PHP 5.4 墨盒上运行 Grunt/Gulp 吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢 OpenShift 的想法,但我希望能够在部署时运行 JavaScript 任务运行器.

I love the idea of OpenShift but I want to be able to run a JavaScript task runner on deployment.

我注意到 NPM 可用,但是每当我尝试安装我的 package.json 文件或 npm install grunt 时,我都会收到以下错误:

I've noticed NPM is available but whenever I try to install my package.json file or npm install grunt, I get the following error:

Please try running this command again as root/Administrator.

有没有办法让它在 PHP 5.4 墨盒上运行?

Is there a way to get this working on a PHP 5.4 cartridge?

任何帮助将不胜感激.

推荐答案

这应该是可能的...虽然它会相当困难.原因是因为当墨盒部署到设备时,会执行配置脚本来设置环境变量、运行时路径等内容.因此您需要执行 NodeJs 墨盒 并将它们放入动作钩子.一旦这一切都说了又做了,你应该能够让它发挥作用.

It should be possible... although it would be rather difficult. The reason is being is because when a cartridge is deployed to a gear, there are config scripts executed to setup things like environment variables, runtime paths, etc. So you'll need to take some of the actions listed in the NodeJs cartridge and put them in a action hook. Once thats all said and done you should be able to get that working.

这篇关于我可以在我的 PHP 5.4 墨盒上运行 Grunt/Gulp 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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