2014-10-06 70 views
4

环境:
的Mac OSX小牛10.9.4
罗盘1.0.1(北极星)
罗盘蓝图(1.0.0)
萨斯3.4.5(选择性史蒂夫)
煎茶应用构建测试命令没有错误煎茶触摸2.4.0 SASS编译错误

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

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 

然后我触摸/资源/主题/字体文件夹复制到资源/上海社会科学院/文件夹,然后这个错误固定。
但我怀疑为什么会在版本2.3.2(sencha touch)中出现这种情况,我用指南针正确编译。

然后是另一个错误:

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 
+2

你使用煎茶Cmd的?使用Cmd你不需要下载指南针,但是你可以运行'sencha app build'或'sencha ant sass'。 – Saki 2014-10-06 11:29:15

+0

@Saki是的,sencha ant sass它的工作原理。但我不知道指南针现在无法正常工作,当我正确使用sencha时2.3.2 – icese7en 2014-10-06 12:37:11

+0

@Saki无论如何都谢谢你。我看到一个关于这个问题的官方文章,但是当版本是2.3.0时,我已经做了罗盘编译,现在它不工作。 – icese7en 2014-10-06 13:01:09

回答

4

感谢@Saki。我选择从煎茶官方博客一句话来帮助其他人达到这样的问题:

With the introduction of Ext JS 4.2 and theme packages, compass watch no longer understood the structure of themes making “sencha ant sass” the only option for building Sass. The “sass” build step, however, was a forced, full rebuild and was many times slower than compass watch.

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