Sass 开发工作流问题 [英] Sass development workflow issues

查看:51
本文介绍了Sass 开发工作流问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试将 Sass 应用到我的开发工作流程中.我主要从事前端开发,因此,我经常更新样式表.经过无休止的搜索,我还没有找到我认为应该是一个简单问题的答案.

I've been trying to adopt Sass into my development workflow. I do primarily front-end development and as such, I am updating stylesheets quite frequently. After endless searching, I have yet to find the answer to what I feel should be a simple question.

我同时使用 Coda 和 Textmate,因此任何一个的解决方案就足够了.在本地开发时,我打开终端,查看我的 .scss 文件,然后去镇上.我保存了我的 .scss 文件,它很高兴地更新了我的 .css 文件......然后我不得不手动选择 .css 并将其发布到远程服务器,这让我有点烦恼.
这不是世界末日,但不得不暂停我通常的开发工作流程以手动上传我不积极参与的文件正变得令人讨厌.在 Coda 中,它不会检测文件何时在 Coda 之外更新,因此不会标记为发布.这让我疯狂.我只需要一种方法来保存 .scss 文件并将 .css 文件轻松/自动上传到远程服务器.任何帮助将不胜感激!

I use both Coda and Textmate, so a solution for either would suffice. When developing locally, I open the terminal, get my .scss file watched, then go to town. I save my .scss file, it happily updates my .css file... and then I'm left with the slight annoyance of having to manually select the .css and publish it to the remote server.
Its not the end of the world but having to pause my usual dev workflow to manually upload a file I'm not actively in is becoming a nuisance. In Coda, it doesn't detect when a file has been updated outside of Coda, so it isn't marked for publishing. Its driving me crazy. I just need a way to save the .scss file and have the .css file easily/automatically uploaded to the remote server. Any help would be greatly appreciated!

推荐答案

The Sublime SFTP/FTP 插件每当 SCSS 编译器更新 .css 输出文件时,它都可以监控并自动上传.

The Sublime SFTP/FTP Plugin can monitor and auto-upload the .css output file whenever it's updated by the SCSS compiler.

  1. 将您的项目目录映射到您的服务器
  2. 通过远程浏览来检查它是否正常工作
  3. 右键单击您的 .css 输出文件,然后选择监控文件(在外部保存时上传)"
  4. 在 Sublime 中保持文件的选项卡打开,以确保它一直受到监控/上传.

如需额外积分,请查看 Browsersync 或 LiveReload.

For extra points, have a look at Browsersync or LiveReload.

这篇关于Sass 开发工作流问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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