【问题标题】:What is the purpose of the load File.Join line in config.rb for Sencha Touch?Sencha Touch 的 config.rb 中加载 File.Join 行的目的是什么?
【发布时间】:2013-01-14 20:56:21
【问题描述】:

主题演示中使用的 config.rb 如下所示:

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

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

# Look for any *.scss files in same directory as this file
# Place compiled *.css files in the parent directory
sass_path    = dir
css_path     = File.join(dir, "..")
output_style = :expanded
environment  = :development

File.join 行的用途是什么?与我从 github 下载的主题演示相关的路径似乎不正确:

https://github.com/senchalearn/Touch-Theming

【问题讨论】:

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


    【解决方案1】:

    根据Ruby 文档:

    返回通过使用 File::SEPARATOR 连接字符串形成的新字符串。

    这是文档的链接:

    http://www.ruby-doc.org/core-1.9.3/File.html

    基本上,File.join 将字符串连接在一起,返回文件路径中使用的新字符串。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-05-07
      • 2012-08-18
      • 1970-01-01
      • 2012-01-15
      • 2023-03-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多