有没有办法将 960 和指南针与 sproutcore 一起使用?
有办法做到这一点吗?我知道 Compass 可以在 sproutcore 中使用,但我也想使用 960 compass 插件。我尝试在 app.css 中导入“960/grid”,但它一直抛出错误
Is there a way to do this? I know Compass can be used in sproutcore, but i also want to use the 960 compass plugin. I tried dong import "960/grid" in my app.css but it keeps throwing an error
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嗯,有一种方法可以工作,但我不确定是否有更干净的解决方案。我只是使用 sproutcore 1.6 和车把模板设置了一个测试项目
,并在 apps/MyTest/resources/stylesheets 中添加了一个附加的“test_960.scss”文件,其中包含以下内容
但是,这不起作用,因为 sc -服务器无法检测到 960 指南针插件。如果您使用 -v 标志运行 sc-server 来获取调试输出,您可以轻松发现这一点。您会发现这样的异常
问题是,960 指南针插件未安装在 gems/compass 0.11.3/frameworks 中,而是安装在gems/compass-960-plugin- 中0.10.3。您可以做的是在框架目录中创建一个符号链接,例如
停止并重新启动 sc-server,上面的示例将立即运行。
我不知道这对其他基于指南针的应用程序是否有任何不良影响。如前所述,它适用于 sproutcore,但我没有时间进一步测试它。这也适用于其他插件。此外,我没有测试当您构建最终应用程序时这是否也可以正确编译。
Well, there is a way it works but I'm not sure if there is a cleaner solution. I just setup a test-project with sproutcore 1.6 and handlebar templates
and added an additional "test_960.scss" file in apps/MyTest/resources/stylesheets with the following content
However, this does not work since sc-server isn't able to detect the 960 compass plugin. You can easily spot this if you are running sc-server with the -v flag to get the debug output. You'll find an exception like this
The problem is, that the 960 compass plugin isn't installed within gems/compass 0.11.3/frameworks but in gems/compass-960-plugin-0.10.3. What you can do so, is create a symlink into the framework directory, like that
Stop and restart sc-server and the above example will run now.
I don't know if this has any bad implications on other compass based applications. As said, it works for sproutcore but I had not the time to test it further. This also works with other plugins. Moreover, I did not test if this does also compile correctly when you build your final application.