AWS Elastic Beanstalk运行Grunt任务 [英] AWS Elastic Beanstalk run Grunt task
问题描述
我想在弹性beanstalk上运行一个node.js应用程序。我有一个客户端,通过一个咕噜的工作(玉,少,concat等)来构建我从git中排除这个文件夹
我可以通过 grunt buildClient
由 grunt-cli
我添加了 grunt
和 grunt-cli
在我的包中 dev-dependencies
我想在应用程序启动之前运行grunt构建,我已经在 .ebextensions / app.config $ c中设置了一个配置$ c
$ $ p $ $ code $ container_commands:
01_build_client
命令:grunt buildClient
我想我的cwd是 / tmp / deployment / application /
但有说< 我也尝试将grunt作业放在 如何构建我的咕噜作业在EBS实例上? 在paas上运行Grunt时,最好安装grunt-cli和grunt的本地副本在本地项目中。这样它总是可用的,并且是你需要的确切版本。然后你运行 例如,您的 I want to run a node.js application on elastic beanstalk. I have a client which gets build by a grunt job (jade, less, concat, etc.) I excluded this folder from git I can localy run this by I added I want to run the grunt build before the application is launched, i already setup a configuration in I guess my cwd is but there is says i also tried putting the grunt job in the How do i build my grunt job on a EBS instance? When running Grunt on a paas, it's best to install a local copy of grunt-cli and grunt locally in the project. That way it's always available and is the exact version you'll need. Then you run For example, your
这篇关于AWS Elastic Beanstalk运行Grunt任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
postinstall $ c $
package.json
的部分,但这也不起作用。
npm install
而不是 grunt
,这样你的 postinstall
package.json
可能如下所示:
grunt:0.4.5,
grunt-cli:0.1.13,
grunt buildClient
which is executed by grunt-cli
grunt
and grunt-cli
in my packages dev-dependencies
.ebextensions/app.config
container_commands:
01_build_client:
command: grunt buildClient
/tmp/deployment/application/
Fatal error: Unable to find local grunt
. I guess grunt-cli is installed, but why is this error?postinstall
section of package.json
, but this doesnt work as well.npm install
instead of grunt
so your postinstall
works properly.package.json
might look like this:"grunt": "0.4.5",
"grunt-cli": "0.1.13",