Eclipse haml/sass 编辑 + html /css 生成

发布于 2024-10-10 00:39:14 字数 405 浏览 2 评论 0原文

我一直在使用 haml 和 sass 并从命令行生成一个带有 staticmatic 的平面站点。

有人用过ide吗?

我安装了 Apatana studio (RadRails) 插件,它有 haml &开箱即用的 sass 突出显示。对于这个网站,我只想要一个轻量级脚本项目(无rails)。

我将使用什么类型的项目,以及如何添加一些内容,以便我可以例如右键单击项目文件夹以运行

静态构建 [my-project]

(或其他)以从 haml + sass 生成站点?

我喜欢 staticmatic,因为我可以使用 ruby​​ 库作为助手。

很高兴接受有关任何编辑的建议。但我也热衷于坚持使用一位编辑来完成所有事情。 (也是 WTB 自动完成)。

干杯

I've been playing with haml and sass and generating a flat site with staticmatic from the command line.

Has anyone been using an ide for this?

I have the Apatana studio (RadRails) plugin installed and it has haml & sass highlighting out of the box. For this site I just want a lightweight script project (no rails).

What type of project would I use, and how would i add something so i could for example, right click the project folder in order to run

staticmatic build [my-project]

(or other) to generate the site from the haml + sass?

I like staticmatic as I can use ruby libraries as helpers.

Happy to take suggestions about any editor. But i am also keen to stick with one editor for everything. (also WTB auto complete).

Cheers

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

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

发布评论

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

评论(3

眼睛会笑 2024-10-17 00:39:14

您可以从 RadRails IDE 运行 rake 任务,但我没能让它工作。 Ruby 可能是该项目类型的正确选择。我不喜欢 IDE,因为它们使事情变得复杂并且减慢速度。所以我的选择通常是 Textmate + 终端。

看看这个项目中的 Rakefile:https://github.com/adamstac/staticmatic-bootstrap

You can run rake tasks from the RadRails IDE, though I didn't manage to get it work. Ruby is probably right choice for the project type. I don't like IDEs because they complicate and slow things down. So my choice is normally Textmate + terminal.

Take a look at Rakefile in this project: https://github.com/adamstac/staticmatic-bootstrap

情深缘浅 2024-10-17 00:39:14

这不完全是您所要求的...但是看一下我写的小脚本。它将监视您选择的目录中 SCSS 和 HAML 的更改,并将它们编译为 html 和 css。如果需要,您可以对 watch.rb 进行一些小的编辑,在终端中运行它,甚至无需运行命令即可生成站点。

PS - 如果您决定尝试一下,您将需要来自 github 或 rubygems.org 的 fssm gem 。

This isn't exactly what you're asking for...but take a look at a tiny script that I wrote. It will watch directories of your choosing for changes in SCSS and HAML and compile them to html and css. You could make some minor edits to watch.rb if desired, run this in a terminal, and have the site generated without even having to run a command.

PS - if you decide to try this out, you'll need the fssm gem from github or rubygems.org.

墨落成白 2024-10-17 00:39:14

Ruby 或 Web 项目类型是最合适的,但我认为在本例中选择哪种并不重要。

您可以通过多种方式实现自定义命令...

  1. 您可以按照 Heikki 的建议在项目 Rakefile 中编写 Rake 任务,然后右键单击并使用 Rake 菜单(从 Studio 3.0.2 开始)启动该任务,或者在嵌入式终端视图中运行它。
  2. 您可以编写/编辑自定义卢布并添加用于启动 staticmatic 的命令。请参阅 http://wiki.appcelerator.org/display/tis/Executing+ an+External+Command
  3. 您可以使用 Eclipse 路径并在 Run > 下创建“外部工具启动配置”。外部工具。外部工具配置...>>程序。在那里,您可以设置启动来执行某些程序(例如 ruby​​ 解释器或静态脚本本身)并传入参数。然后您可以使用运行下拉菜单。

A Ruby or Web project type would be most fitting, though I don't think it would matter which in this case.

You can achieve custom commands a number of ways...

  1. You can write up a Rake task in the project Rakefile as Heikki suggested, and then right click and use the Rake menu (as of Studio 3.0.2) to launch that task, or run it inside the embedded Terminal view.
  2. You can write/edit a custom ruble and add a command for launching staticmatic. See http://wiki.appcelerator.org/display/tis/Executing+an+External+Command
  3. You can go the Eclipse route and create an "External Tool Launch configuration" under Run > External Tools. External Tools configuration... > Program. There you can set up a launch to execute some program (say the ruby interpreter or staticmatic script itself) and pass in the argument. Then you can use the run drop-down menu.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文