Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace libsass with sassc-embedded #233

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 6 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
# SassC [![Build Status](https://travis-ci.org/sass/sassc-ruby.svg?branch=master)](https://travis-ci.org/sass/sassc-ruby) [![Gem Version](https://badge.fury.io/rb/sassc.svg)](http://badge.fury.io/rb/sassc)

Use `libsass` with Ruby!
Use `sassc-embedded` with SassC Ruby!

This gem combines the speed of `libsass`, the [Sass C implementation](https://github.com/sass/libsass), with the ease of use of the original [Ruby Sass](https://github.com/sass/ruby-sass) library.
This fork removes the deprecated [`libsass`](https://github.com/sass/libsass) and replace it with [`sassc-embedded`](https://github.com/ntkme/sassc-embedded-polyfill-ruby), providing latest sass features and fast gem installation.

### libsass Version

[3.6.1](https://github.com/sass/libsass/releases/3.6.1)
This should essentially be a drop in alternative to [sass/sassc-ruby](https://github.com/sass/sassc-ruby).

## Installation

Add this line to your application's Gemfile:
Add these lines to your application's Gemfile:

```ruby
gem 'sassc'
gem 'sassc', github: 'sass/sassc-ruby', ref: "refs/pull/233/head"
gem 'sassc-embedded'
```

And then execute:
Expand All @@ -22,12 +21,6 @@ And then execute:
bundle
```

Or install it yourself as:

```bash
gem install sassc
```

## Usage

This library utilizes `libsass` to allow you to compile SCSS or SASS syntax
Expand All @@ -40,8 +33,6 @@ SassC::Engine.new(sass, style: :compressed).render
**Note**: If you want to use this library with Rails/Sprockets, check out
[sassc-rails](https://github.com/bolandrm/sassc-rails).

Additionally, you can use `SassC::Sass2Scss` to convert Sass syntax to Scss syntax.

## Credits

This gem is maintained by [Ryan Boland](https://ryanboland.com)
Expand Down
27 changes: 17 additions & 10 deletions lib/sassc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def self.load_paths
end

require_relative "sassc/version"
require_relative "sassc/native"
# require_relative "sassc/native"
require_relative "sassc/import_handler"
require_relative "sassc/importer"
require_relative "sassc/util"
Expand All @@ -42,16 +42,23 @@ def self.load_paths
require_relative "sassc/script/value/list"
require_relative "sassc/script/value/map"
require_relative "sassc/script/functions"
require_relative "sassc/script/value_conversion"
require_relative "sassc/script/value_conversion/base"
require_relative "sassc/script/value_conversion/string"
require_relative "sassc/script/value_conversion/number"
require_relative "sassc/script/value_conversion/color"
require_relative "sassc/script/value_conversion/map"
require_relative "sassc/script/value_conversion/list"
require_relative "sassc/script/value_conversion/bool"
# require_relative "sassc/script/value_conversion"
# require_relative "sassc/script/value_conversion/base"
# require_relative "sassc/script/value_conversion/string"
# require_relative "sassc/script/value_conversion/number"
# require_relative "sassc/script/value_conversion/color"
# require_relative "sassc/script/value_conversion/map"
# require_relative "sassc/script/value_conversion/list"
# require_relative "sassc/script/value_conversion/bool"
require_relative "sassc/functions_handler"
require_relative "sassc/dependency"
require_relative "sassc/error"
require_relative "sassc/engine"
require_relative "sassc/sass_2_scss"
# require_relative "sassc/sass_2_scss"

begin
old_verbose, $VERBOSE = $VERBOSE, nil
require 'sassc-embedded'
ensure
$VERBOSE = old_verbose
end
4 changes: 3 additions & 1 deletion sassc.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]

spec.platform = Gem::Platform::RUBY
spec.extensions = ["ext/extconf.rb"]
# spec.extensions = ["ext/extconf.rb"]

spec.add_development_dependency "minitest", "~> 5.5.1"
spec.add_development_dependency "minitest-around"
Expand All @@ -35,6 +35,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "rake-compiler"
spec.add_development_dependency "rake-compiler-dock"

=begin
spec.add_dependency "ffi", "~> 1.9"

gem_dir = File.expand_path(File.dirname(__FILE__)) + "/"
Expand Down Expand Up @@ -65,5 +66,6 @@ Gem::Specification.new do |spec|
end
spec.files << File.join(submodule_relative_path, 'VERSION')
end
=end

end