Can I run Grunt/Gulp on my PHP 5.4 cartridge?

别说谁变了你拦得住时间么 提交于 2019-12-25 03:26:46

问题


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

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.

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

Any help would be greatly appreciated.


回答1:


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.



来源:https://stackoverflow.com/questions/24933020/can-i-run-grunt-gulp-on-my-php-5-4-cartridge

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!