css - 在 AWS 上使用 Node.js 的 SASS - 编译样式表

标签 css node.js git amazon-web-services amazon-elastic-beanstalk

我正在开发一个部署在 AWS Elastic Beanstalk 上并带有 Node.js 后端的应用程序。对于样式,我使用 SASS。 SASS 文件由 Git 进行版本控制,但编译后的 CSS 文件则不然。但是,当使用 eb deploy 时,只有 SASS 文件被发送到 Elastic Beanstalk。

确保所有 SASS 文件都编译为 CSS 并发送到 EB 而无需将它们包含在 Git 中的最佳方法是什么?

最佳答案

根据文档: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs_express.html

option_settings:
 - namespace: aws:elasticbeanstalk:container:nodejs
   option_name: NodeCommand
   value: "gulp build && npm start"

查看gulp build,只需将其替换为编译 Assets 的命令即可

关于css - 在 AWS 上使用 Node.js 的 SASS - 编译样式表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37696797/

相关文章:

linux - "nothing to commit (working directory clean)"添加文件夹时

html - 指针光标不显示

javascript - 在 onload 函数中设置 Canvas 背景不起作用

css - 检查 child 是否是最后一个 - 还包括文本节点

javascript - Socket IO 客户端接收的对象与服务器发送的对象不同

node.js - Mongoose 过滤后提取第一个子数组元素

html - 将文本用于链接,将 XSL 用于 HTML 弹出窗口

ruby-on-rails - 检测点击了哪个反向链接

git - 去获取没有互联网访问权限的服务器

git - .gitignore : track a single file in an ignored directory