• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

jekyll/jekyll-sass-converter: A Sass converter for Jekyll.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

jekyll/jekyll-sass-converter

开源软件地址:

https://github.com/jekyll/jekyll-sass-converter

开源编程语言:

Ruby 96.7%

开源软件介绍:

Jekyll Sass Converter

Let Jekyll build your Sass and SCSS!

Continuous Integration

Installation

Jekyll Sass Converter requires Jekyll 2.0.0 or greater and is bundled with Jekyll so you don't need to install it if you're already using Jekyll.

Add this line to your application's Gemfile:

gem 'jekyll-sass-converter'

And then execute:

$ bundle

Or install it yourself as:

$ gem install jekyll-sass-converter

Usage

Jekyll Sass Converter comes bundled with Jekyll 2.0.0 and greater. For more information about usage, visit the Jekyll Assets Documentation page.

Sass Implementations

SassC

By default, Jekyll Sass Converter uses sassc for Sass implmentation. sassc is based on LibSass, and LibSass is deprecated.

Sass Embedded

sass-embedded is a host for the Sass embedded protocol.

The host runs Dart Sass compiler as a subprocess and communicates with the dart-sass compiler by sending / receiving protobuf messages via the standard input-output channel.

To use the sass-embedded implementation, you need to first install the sass-embedded gem either via your Gemfile and Bundler, or directly.

Add this line to your application's Gemfile:

gem 'sass-embedded', '~> 1.0'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sass-embedded

Then, you have to specify sass-embedded as the desired implementation in your _config.yml:

sass:
  implementation: sass-embedded

Source Maps

Starting with v2.0, the Converter will by default generate a source map file along with the .css output file. The source map is useful when we use the web developers tools of Chrome or Firefox to debug our .sass or .scss stylesheets.

The source map is a file that maps from the output .css file to the original source .sass or .scss style sheets. Thus enabling the browser to reconstruct the original source and present the reconstructed original in the debugger.

Configuration Options

Configuration options are specified in the _config.yml file in the following way:

sass:
  <option_name1>: <option_value1>
  <option_name2>: <option_value2>

Available options are:

  • implementation

    Sets the Sass implementation to use. Can be sassc or sass-embedded.

    Defaults to sassc.

  • style

    Sets the style of the CSS-output. Can be nested, compact, compressed, or expanded. See the SASS_REFERENCE for details.

    Defaults to compact for sassc. Defaults to expanded for sass-embedded.

  • sass_dir

    A filesystem-path which should be searched for Sass partials.

    Defaults to _sass

  • load_paths

    An array of additional filesystem-paths which should be searched for Sass partials.

    Defaults to []

  • line_comments

    When set to true, the line number and filename of the source is included in the compiled CSS-file. Useful for debugging when the source map is not available, but might considerably increase the size of the generated CSS files.

    Defaults to false.

  • sourcemap

    Controls when source maps shall be generated.

    • never — causes no source maps to be generated at all.
    • always — source maps will always be generated.
    • development — source maps will only be generated if the site is in development environment. That is, when the environment variable JEKYLL_ENV is set to development.

    Defaults to always.

Contributing

  1. Fork it ( https://github.com/jekyll/jekyll-sass-converter/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap