如果您在 FTP 上编辑并使用 Sass (Scss) 或更少,如何进行更改和编译 CSS?

发布于 2024-12-26 14:14:36 字数 197 浏览 5 评论 0原文

最近学习了Less和Scss+compass。我的问题是,如果我使用 ftp 将已编译的 .css 文件上传到网站,并且我出城或离开家,并且想要对该 CSS 进行一些更改,我该如何在 .scss 中进行这些更改和 .less 文件并编译?

我可以访问朋友的咖啡馆 PC,但无法在我朋友或咖啡馆的 PC 上安装 ruby​​、compass、sass 或更少的软件。

I recently learned about Less and Scss+compass. My question is, if I'm uploading a compiled .css file using ftp to a website, and I'm out of town or away from home and want to make some changes to that CSS, how do I make those changes in .scss and .less files and compile?

I have access to a friend's cafe PC but I cannot install ruby, compass, sass or less on my friend's or the cafe PC.

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

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

发布评论

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

评论(2

盗琴音 2025-01-02 14:14:37

有 SASS 和 LESS 编译器可用于在最终用户浏览器中编译 javascript。如果您想测试一下,您可以在您无权安装守护程序的服务器上使用其中之一。如果您要在生产中进行这些更改,请不要这样做。您不应该对需要在服务器上编译的文件进行实时编辑。这是糟糕的编程实践。

There are SASS and LESS compilers available for javascript to compile in the end users browser. If you want to test things out, you can use one of those on the server where you don't have access to install a daemon. If you are making these changes in production, DON'T. You shouldn't be doing live edits of files that require compiling on the server. It's terrible programming practice.

无人问我粥可暖 2025-01-02 14:14:37

如果您确实想这样做,我在 NetDrive 方面取得的成功有限,它可以将 FTP 驱动器安装为计算机上的驱动器。这意味着 WinLess 等编译器可以查看驱动器并编译 CSS。

我说的是有限,就好像我在文本编辑器中打开我的 Less 文件,然后按保存,检查浏览器,返回编辑器 - 它给我一条消息:“另一个用户已更新该文件”。我猜测它认为因为我通过 NetDrive 打开了它,所以 NetDrive 已经更新了它。

我可以通过文本编辑器内置的 FTP 打开该文件,但 WinLess 似乎看不到它。

像这样的东西肯定有潜力。 Windows 上的 CSS/LESS 基本 HTML 编辑器也有市场,它可以自动编译 LESS 并使用内置的 FTP 驱动器。我愿意花很多钱来做这样的事情!

如果您确实在生产服务器上编译文件,我建议您需要定期备份主 CSS 文件 - 尽管无论如何这都是最佳实践。

希望对某人有所帮助,或者如果有人在这方面取得了更大的成功,请告诉我!

If you do want to do this, I've had limited success with NetDrive which can mount an FTP drive as a drive on your computer. This means that a compiler such as WinLess can see the drive and compile the CSS.

I say limited as if I open up my Less file in my text editor and press save, check the browser, go back to the editor - it gives me a message that "another user has updated the file". I'm guessing that it thinks that because I opened it up through NetDrive that NetDrive had updated it.

I can open the file through the in built FTP of my text editor but then WinLess doesn't seem to be able to see it.

There's definite potential with something like this. There's also a market for a CSS/LESS basic HTML editor for windows that can compile the LESS automatically and work with a built in FTP drive. I'd pay good money for something that did that!

If you do compile files on a production server I'd suggest that you need to make regular backups of the main CSS file - although this would be best practice anyway.

Hope that helps someone or if someone has more success with any of this please let me know!

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