简体   繁体   English

在CloudControl中部署基于grunt的应用

[英]Deploying grunt based app in CloudControl

I'm trying to deploy a grunt based app to CC. 我正在尝试将基于grunt的应用程序部署到CC。 I would like to deploy the dist version of the app, which is generated with the grunt build task. 我想部署该应用程序的dist版本,该版本是通过grunt build任务生成的。 Right now, what I've done is to move my grunt devDependencies to dependencies and use the NPM postinstall hook to run the grunt build task. 现在,我要做的是将grunt devDependencies移至dependencies并使用NPM postinstall挂钩运行grunt构建任务。 This way once updated NPM dependencies CC runs the task. 这样,一旦更新了NPM依赖项CC,就可以运行任务。

But, I've two issues with this approach: 但是,这种方法有两个问题:

1) compass is not working 1) compass不起作用

2) it just doesn't feel correct to move all my grunt dependencies to dependencies . 2)只是将我所有的咕dependencies声依赖项移到dependencies感觉不对。 The first issue I think that I could fix it using another SCSS grunt module. 我认为第一个问题可以使用另一个SCSS grunt模块进行修复。

Any other alternative approach? 还有其他替代方法吗? Preferably I don't want to save my dist builds in the repository. 最好不要将dist版本保存在存储库中。

Can you please explain the situation a little bit more? 您能否再说明一下情况?

Normally I would follow the following steps 通常我会按照以下步骤

Local 本地

  1. Do the npm install 做npm安装
  2. Do the grunt build 做咕gr的建设
  3. push to the cloud 推向云端

    Server 服务器

  4. Set the environment as production(assuming that all your files check for the environment and load files accordingly) 将环境设置为生产环境(假设所有文件都检查环境并相应地加载文件)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM