支持 Coda 或 Espresso 中的 Haml 实时预览吗?

发布于 2024-11-13 21:59:03 字数 777 浏览 3 评论 0原文

我刚刚发现了美丽的 HamlSass,并且希望使用这些语言进行开发,但需要实时预览。 CodaEspresso 都允许对 HTML 文件进行精美的实时预览,但 Haml 文件的预览只是将其显示为纯文本。

虽然 Espresso 存在添加语法突出显示的糖,这很好,但我想要一些可以自动将 Haml 文件编译为 HTML 的东西,然后让我预览它而不是 Haml。

Coda、Espresso 或任何其他 Web 开发工具是否存在类似的东西?

(如果有什么不同的话,我不是在为 Ruby on Rails 开发,我正在制作一个静态网站,所以 Ruby on Rails 插件应该不会有帮助。 我尝试过的软件是 StaticMatic 和 Middleman。 StaticMatic 的开发似乎已停止,并且出于某种原因,MiddleMan 在创建我的初始目录结构后拒绝工作。也许我用错了。)

I just discovered the beautiful Haml and Sass, and want to develop in these languages but with live previews. Coda and Espresso both allow for beautiful live previews of HTML files, but previews of an Haml file simply show it as plain text.

While there exist sugars for Espresso that add syntax highlighting, which is nice, I would like something that automatically compiles Haml files to HTML, and then lets me preview that instead of Haml.

Does anything like this exist for either Coda, or Espresso, or for any other web development tool out there?

(If it makes a difference, I'm not developing for Ruby on Rails, I'm making a static website, so the Ruby on Rails plugin shouldn't help AFAIK.
Software I tried out were StaticMatic and Middleman. StaticMatic's development seems discontinued, and for some reason MiddleMan refuses to work after creating my initial directory structure. Maybe I'm using it wrong.)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

丶视觉 2024-11-20 21:59:03

我不使用浓缩咖啡,所以没有评论。然而,据我所知,Coda 不提供对 Haml 或 Sass 的任何支持。我一直密切关注 Coda 论坛,因为我是付费用户,看起来 2.0 版本即将推出。谁知道呢,也许这会被包括在内。

目前,由于您没有使用 Ruby on Rails,我可能建议 TextMate 。它并不“开箱即用”地执行 Haml 或 Sass,但可以使用“捆绑包”对其进行配置。

安装 TextMate 的 HAML 包 是关于如何为 Haml/Sass 设置 TextMate 的入门读本,我怀疑还有其他内容。

也就是说,您可以花大约 TextMate 的费用购买 RubyMine (69 美元),它既可以执行 Haml(通过 RubyGem)又可以执行 Sass(通过插件),并且还可以在内部处理运行 Sass --watch。我知道您没有使用 Ruby,所以也许使用主要为 Ruby 制作的工具的想法没有吸引力,但它确实适用于 Haml 和 Sass环境非常好。

第三个选项是 BBEdit,它也可以处理 Haml 和 Sass。有关 BBEdit 插件的一些信息位于 BBEdit- HAML-SASS 无代码语言模块

我希望这有帮助。

PS:我是我提到的所有平台的付费用户。虽然我使用 RubyMine 作为我的主要工具,但我发现 TextMate 仍然有很多用途我正在编程,需要一个快速、友好的窗口来检查代码。当我需要进行复杂的正则表达式式搜索和替换时,我曾经使用 BBEdit,但后来我发现了如何执行TextMate 中也是如此,所以 BBEdit 有点落伍了。结尾?它看起来很漂亮,但不再能完成那么多工作(尽管 Panic 的 Transmit 仍然是一个核心应用程序)。

I don't use Espresso, so no comment there. However, Coda does not provide any support for Haml or Sass that I can find. I've been closely following the Coda forums, as I am a paid user, and it looks as though a 2.0 version is forthcoming. Who knows, perhaps that'll be included.

For now, since you're not using Ruby on Rails, I might suggest TextMate. It doesn't do Haml or Sass "right out of the box", but it can be configured to do so using "Bundles."

Installing HAML bundle for TextMate is a primer on how to setup TextMate for Haml/Sass, and I suspect there are others.

That said, for roughly the cost of TextMate you can purchase RubyMine ($69), which does both Haml (via RubyGem) and Sass (via Plugin), and can also handle running Sass --watch internally. I know you're not using Ruby, so maybe the idea of using a tool made primarily for Ruby doesn't appeal, but it does work in both the Haml and Sass environments very nicely.

The third option would be BBEdit, which can also handle both Haml and Sass. Some information on the plugin for BBEdit is in BBEdit-Codeless-Language-Module-for-HAML-SASS.

I hope this helps.

P.S.: I'm a paid user on all the platforms I mentioned. While I use RubyMine as my primary tool, I find that TextMate still gets a lot of use when I'm programming and need a quick, friendly window to examine code in. I used to use BBEdit when I needed to do complex regular expression-style search and replacements, but then I discovered how to do the same thing in TextMate, so BBEdit is sort of collecting dust. Coda? It looks pretty, but doesn't get the job done so much any more (though Panic's Transmit is still very much a core application).

悲喜皆因你 2024-11-20 21:59:03

据我所知,Coda 2 有两个插件:

Coda-Sass-Plug-in 可从 GitHub 获取,并允许您将 scss 文件保存为 css。尽管我对需要一直刷新多个选项卡并不完全满意,但我为我工作。

LessCSS 可从 Incident57 dot com 获取。尽管我始终无法让它工作,但它引导我使用了 CodeKit(由于 CodeKit 的生产,CodeKit 已被封存)。

CodeKit 能够监视文件夹并在保存时从 sass 或 less 生成 css 文件。它还能够处理 Stylus、Haml、Javascript、CoffeeScript、Jade、Slim 和 Kit。

There are two plugins for Coda 2 that I am aware of:

Coda-Sass-Plug-in is available from GitHub and allows you to save out your scss files to css. I worked for me though I wasn't completely happy with needing to refresh multiple tabs all the time.

LessCSS is available from incident57 dot com. Although I was never able to make it work, it lead me to CodeKit (CodeKit has been mothballed due to production of CodeKit).

CodeKit has the ability to watch folders and generate css files from sass or less when they are saved. It also has the ability to handle Stylus, Haml, Javascript, CoffeeScript, Jade, Slim and Kit.

梦行七里 2024-11-20 21:59:03

好吧,对于其他正在寻找答案的人,我决定采用不同的解决方案。我正在使用我的普通编辑器以及“serve”,这是一个 Ruby gem使用 WEBrick 运行 Web 服务器,并自动编译它检测到已更改的任何文件。这包括 HAML、Sass、Slim、Markdown 等文件。我将使用 Coda 的实时预览,或者称为 Playground 的极简浏览器,这样当显示的本地文件发生变化时就无需按刷新了。

这个工作流程目前还不错,尽管它没有任何内置方法可以在我完成并想要部署时将整个站点构建为静态站点。这是 middleman 中的一个功能,但 middleman 仍然拒绝运行,因为它的依赖项 thin 拒绝在 64 位上工作。我可能必须使用终端命令手动编译所有文件,并希望 Haml 解释器能够处理将模板文件与每个文件组合,但我在现阶段对此表示严重怀疑。这种限制以及对“服务”的持续依赖可能会迫使我考虑页面上列出的其他应用程序之一Haml 内容很糟糕

OK, for anyone else looking for an answer to this, I decided to go along with a different solution. I'm using my normal editors, along with 'serve', a Ruby gem that runs a web server using WEBrick, and automatically compiles any files which it detects has changed. This includes HAML, Sass, Slim, Markdown, etc. files. I'm going to be using either Coda's live preview, or the minimalist browser called Playground, which eliminates the need to press refresh when the local file it is displaying changes.

This workflow is nice for now, although it doesn't have any built-in method to build the entire site into a static site when I'm done and want to deploy. This is a feature in middleman, but middleman still refuses to run because a dependency of it, thin, refuses to work on 64 bits. I might have to manually compile all the files using the terminal command, and hope the Haml interpreter can handle combining template files with each file, which I seriously doubt at this stage. This limitation and thus the continued dependence on 'serve' might force me to consider one of the other applications out there, listed on the page Haml Sucks for Content.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文