【问题标题】:Sencha touch 2.4.0 SASS compile errorSencha touch 2.4.0 SASS 编译报错
【发布时间】:2014-11-30 14:26:48
【问题描述】:

环境:
Mac OSX Mavericks 10.9.4
指南针 1.0.1(北极星)
指南针蓝图 (1.0.0)
Sass 3.4.5(选择性史蒂夫)
sencha 应用构建测试命令没有错误

当我在./resources/sass/目录下编译app.scss文件时,发生了错误。

compass compile app.scss
    error app.scss (Line 209 of /Users/icese7en/Sites/Demos/Sencha/Practice/WeatherApp/touch/resources/themes/stylesheets/sencha-touch/base/src/_Class.scss: File not found or cannot be read: /Users/icese7en/Sites/Demos/Sencha/Practice/WeatherApp/resources/sass/fonts/pictos/pictos-web.woff)
File not found or cannot be read: /Users/icese7en/Sites/Demos/Sencha/Practice/WeatherApp/resources/sass/fonts/pictos/pictos-web.woff

然后我将 touch/resources/themes/fonts 文件夹复制到 resources/sass/ 文件夹,然后修复了此错误。
但我怀疑为什么在 2.3.2 ( sencha touch) 版本中我使用 compass 正确编译时会发生这种情况。

然后还有一个错误:

compass compile app.scss
error app.scss (Line 42 of /Users/icese7en/Sites/Demos/Sencha/Practice/WeatherApp/touch/resources/themes/stylesheets/sencha-touch/base/src/_ProgressIndicator.scss: Undefined mixin 'experimental'.)
Sass::SyntaxError on line ["42"] of /Users/icese7en/Sites/Demos/Sencha/Practice/WeatherApp/touch/resources/themes/stylesheets/sencha-touch/base/src/_ProgressIndicator.scss: Undefined mixin 'experimental'.
Run with --trace to see the full backtrace 

现在我无法修复它。

这是app.scss的内容:

// The following two lines import the default Sencha Touch theme. If you are building
// a new theme, remove them and the add your own CSS on top of the base CSS (which
// is already included in your app.json file).
@import 'sencha-touch/default';
@import 'sencha-touch/default/all';

// Custom code goes here..

// Examples of using the icon mixin:
// @include icon('user');

config.rb:

# Get the directory that this configuration file exists in
dir = File.dirname(__FILE__)

# Load the sencha-touch framework automatically.
load File.join(dir, '..', '..', 'touch', 'resources', 'themes')

# Compass configurations
sass_path = dir
css_path = File.join(dir, "..", "css")

# Require any additional compass plugins here.
images_dir = File.join(dir, "..", "images")
output_style = :compressed
environment = :production

【问题讨论】:

  • 你使用 Sencha Cmd 吗?使用 Cmd 时,您不需要进入指南针,但您可以运行 sencha app buildsencha ant sass
  • @Saki 是的,sencha ant sass 它有效。但我不知道当我正确使用 sencha 2.3.2 时指南针现在不起作用
  • @Saki 还是谢谢你。看到官方的paper关于这个问题,但是我在2.3.0版本的时候确实编译过compass,现在不行了。
  • 请按照 Saki 的通知回答,无需运行“compass watch”,而是从应用程序的根路径运行“sencha ant sass”或“sencha app build”。 @Saki 谢谢你:)
  • 从 2.4.0 开始使用 'sencha app watch' cmd,从应用程序的根目录开始,它将像之前在 sass 文件中使用 'compass watch' cmd 所做的那样进行连续检查。

标签: extjs sass sencha-touch sencha-touch-2 compass-sass


【解决方案1】:

感谢@Saki。我从 sencha 官方博客中摘录一句话来帮助其他人解决这个问题:

随着 Ext JS 4.2 和主题包的引入,指南针手表 不再理解制作“sencha ant sass”的主题结构 构建 Sass 的唯一选择。然而,“sass”构建步骤是 强制、完全重建,比指南针手表慢很多倍。

这是链接:http://www.sencha.com/blog/using-the-new-app-watch-command-in-sencha-cmd-4/

【讨论】:

    猜你喜欢
    • 2013-04-02
    • 2011-10-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多