sassc 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0f19dcd28af296ad0c551e0daecbc3664ea4f2c5
4
- data.tar.gz: d59cb88bcf48437ee1973c72db482a0bcdbafba9
3
+ metadata.gz: c32a473d755804c243e9438910224409aa436dc2
4
+ data.tar.gz: d300151abc8967d2bf817bc1765ce1b26f217b95
5
5
  SHA512:
6
- metadata.gz: 43a8b1b9b66f099ffc77547c6d53f540510c7a712e8c727fc307dcadfd69c17e39d943120e76bd4dfb004842b8465a73bba1381546edc78d20d3d5556c342f6f
7
- data.tar.gz: 42f028720b8ed0d9a35551c00b288ffa591598f13e4f0fab7094c420ac5772c702ddd6c907ce88af07ff1b03f4b41d06cda77cf7ec2b5eeb5d8418a076cf8b2b
6
+ metadata.gz: 18619250305dfe40a0f5ae90b7a04cfd5bfcd5d47f1488ed5938bbef28c9a6ee3ea678b7fbe089a4c3cb54b2aa1d1491138d18b581e2f723d622fa6c2df9e25d
7
+ data.tar.gz: 90f3f763c9d4f9c3b7378ab985592685ce4be94d85355d20bbd23486bb5c06c7bb372851d72e9796d30cc0eb18a1965967f85e224e30bf0fa47c9559f8e8c7d4
data/README.md CHANGED
@@ -18,6 +18,17 @@ to CSS. To compile, use a `SassC::Engine`.
18
18
 
19
19
  Additionally, you can use `SassC::Sass2Scss` to convert Sass syntax to Scss syntax.
20
20
 
21
+ ## Changelog
22
+
23
+ - **1.5.0**
24
+ - Add support for inline source maps
25
+ - **1.4.0**
26
+ - Add support for line number comments
27
+ - **1.3.0**
28
+ - Support Sass color custom function arguments
29
+ - Adds error handling for exceptions in custom functions
30
+ - Custom functions may have optional/default arguments
31
+
21
32
  ## Contributing
22
33
 
23
34
  ### Project Setup
data/lib/sassc/engine.rb CHANGED
@@ -24,6 +24,9 @@ module SassC
24
24
  Native.option_set_include_path(native_options, load_paths)
25
25
  Native.option_set_output_style(native_options, output_style_enum)
26
26
  Native.option_set_source_comments(native_options, true) if line_comments?
27
+ Native.option_set_source_map_file(native_options, source_map_file) if source_map_file
28
+ Native.option_set_source_map_embed(native_options, true) if source_map_embed?
29
+ Native.option_set_source_map_contents(native_options, true) if source_map_contents?
27
30
 
28
31
  import_handler.setup(native_options)
29
32
  functions_handler.setup(native_options)
@@ -69,6 +72,18 @@ module SassC
69
72
  @options[:line_comments]
70
73
  end
71
74
 
75
+ def source_map_embed?
76
+ @options[:source_map_embed]
77
+ end
78
+
79
+ def source_map_contents?
80
+ @options[:source_map_contents]
81
+ end
82
+
83
+ def source_map_file
84
+ @options[:source_map_file]
85
+ end
86
+
72
87
  def import_handler
73
88
  @import_handler ||= ImportHandler.new(@options)
74
89
  end
data/lib/sassc/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module SassC
2
- VERSION = "1.4.0"
2
+ VERSION = "1.5.0"
3
3
  end
data/lib/tasks/libsass.rb CHANGED
@@ -2,11 +2,11 @@ namespace :libsass do
2
2
  desc "Compile libsass"
3
3
  task compile: "ext/libsass/lib/libsass.so"
4
4
 
5
- file "ext/libsass/.git" do
5
+ file "ext/libsass/Makefile" do
6
6
  sh "git submodule update --init"
7
7
  end
8
8
 
9
- file "ext/libsass/lib/libsass.so" => "ext/libsass/.git" do
9
+ file "ext/libsass/lib/libsass.so" => "ext/libsass/Makefile" do
10
10
  libsass_path = ""
11
11
  if Dir.pwd.end_with?('/ext')
12
12
  libsass_path = "libsass"
data/test/engine_test.rb CHANGED
@@ -138,5 +138,26 @@ CSS
138
138
  output = Engine.new(input).render
139
139
  assert_equal input.encoding, output.encoding
140
140
  end
141
+
142
+ def test_inline_source_maps
143
+ template = <<-SCSS
144
+ .foo {
145
+ baz: bang; }
146
+ SCSS
147
+ expected_output = <<-CSS
148
+ /* line 1, stdin */
149
+ .foo {
150
+ baz: bang; }
151
+ CSS
152
+
153
+ output = Engine.new(template, {
154
+ source_map_file: ".",
155
+ source_map_embed: true,
156
+ source_map_contents: true
157
+ }).render
158
+
159
+ assert_match /sourceMappingURL/, output
160
+ assert_match /.foo/, output
161
+ end
141
162
  end
142
163
  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: 1.4.0
4
+ version: 1.5.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-07-10 00:00:00.000000000 Z
11
+ date: 2015-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake