sassc 0.0.11 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0c834fe7f6b0359169fc1f6ba7d1cab0e98c90db
4
- data.tar.gz: fb01c0beb052582b9b7f642b0c723d9c12754c22
3
+ metadata.gz: 7d99b651f166586b10487e114cbe57530cf41072
4
+ data.tar.gz: e8d4530c45f6aac6d2f8f4b6a8b596e459c2a150
5
5
  SHA512:
6
- metadata.gz: 76ac15bb37435e1979a62a05fdd90ab3eaa017e7bce9726e386ee01718f7989929554f878f73924aa5d94d0fbea742503a8d2ee46421a5916e7c6e85c4fde7a1
7
- data.tar.gz: 5838c775f6078cd2be03c47f2ef5637fcea57e521f7d2bbc6af1f78d8aa3c1e42bfe3b165f5ce1ea5ace1b22e6d17d33f8759bf65333a49df74f56b92642aa7f
6
+ metadata.gz: 488fc5c6270fbdc0e86f3a6639e3a64ace06c9497eb0f56f545d014c6bb26135ffae85cfcb5abdbc94bdf8dae067f51e826e66e381a871529c32b1dfb78ca1d2
7
+ data.tar.gz: 68bb498e92248b581a9eeffc90d9fc661712ab504bb547cf562a52376d545f4bbbf0323cd1d5ee84c43e753aaeafc15697c26f325fe5958815f5d69096899dd3
data/README.md CHANGED
@@ -8,6 +8,16 @@ This gem combines the speed of `libsass`, the [Sass C implementation](https://gi
8
8
 
9
9
  [3.2.0-beta.6](https://github.com/sass/libsass/releases/tag/3.2.0-beta.6)
10
10
 
11
+ ## Usage
12
+
13
+ This library utilizes `libsass` to allow you to compile SCSS or SASS syntax
14
+ to CSS. To compile, use a `SassC::Engine`.
15
+
16
+ **Note**: If you want to use this library with Rails/Sprockets, check out
17
+ [sassc-rails](https://github.com/bolandrm/sassc-rails).
18
+
19
+ Additionally, you can use `SassC::Sass2Scss` to convert Sass syntax to Scss syntax.
20
+
11
21
  ## Contributing
12
22
 
13
23
  ### Project Setup
@@ -11,3 +11,4 @@ require_relative "sassc/cache_stores"
11
11
  require_relative "sassc/dependency"
12
12
  require_relative "sassc/error"
13
13
  require_relative "sassc/engine"
14
+ require_relative "sassc/sass_2_scss"
@@ -56,5 +56,6 @@ module SassC
56
56
 
57
57
  require_relative "native/native_context_api"
58
58
  require_relative "native/native_functions_api"
59
+ require_relative "native/sass2scss_api"
59
60
  end
60
61
  end
@@ -0,0 +1,8 @@
1
+ module SassC
2
+ module Native
3
+ # ADDAPI char* ADDCALL sass2scss (const char* sass, const int options);
4
+ attach_function :sass2scss, [:string, :int], :string
5
+
6
+ # ADDAPI const char* ADDCALL sass2scss_version(void);
7
+ end
8
+ end
@@ -0,0 +1,7 @@
1
+ module SassC
2
+ class Sass2Scss
3
+ def self.convert(sass)
4
+ Native.sass2scss(sass, 0)
5
+ end
6
+ end
7
+ end
@@ -1,3 +1,3 @@
1
1
  module SassC
2
- VERSION = "0.0.11"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -0,0 +1,12 @@
1
+ require_relative "test_helper"
2
+
3
+ module SassC
4
+ class Sass2ScssTest < MiniTest::Test
5
+ def test_compact_output
6
+ assert_equal ".blat { color: red; }", Sass2Scss.convert(<<SASS)
7
+ .blat
8
+ color: red
9
+ SASS
10
+ end
11
+ end
12
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sassc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Boland
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-24 00:00:00.000000000 Z
11
+ date: 2015-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -278,10 +278,12 @@ files:
278
278
  - lib/sassc/native/lib_c.rb
279
279
  - lib/sassc/native/native_context_api.rb
280
280
  - lib/sassc/native/native_functions_api.rb
281
+ - lib/sassc/native/sass2scss_api.rb
281
282
  - lib/sassc/native/sass_input_style.rb
282
283
  - lib/sassc/native/sass_output_style.rb
283
284
  - lib/sassc/native/sass_value.rb
284
285
  - lib/sassc/native/string_list.rb
286
+ - lib/sassc/sass_2_scss.rb
285
287
  - lib/sassc/script.rb
286
288
  - lib/sassc/script/functions.rb
287
289
  - lib/sassc/script/string.rb
@@ -293,6 +295,7 @@ files:
293
295
  - test/functions_test.rb
294
296
  - test/native_test.rb
295
297
  - test/output_style_test.rb
298
+ - test/sass_2_scss_test.rb
296
299
  - test/test_helper.rb
297
300
  homepage: https://github.com/bolandrm/sassc-ruby
298
301
  licenses:
@@ -326,4 +329,5 @@ test_files:
326
329
  - test/functions_test.rb
327
330
  - test/native_test.rb
328
331
  - test/output_style_test.rb
332
+ - test/sass_2_scss_test.rb
329
333
  - test/test_helper.rb