sass 3.1.0.alpha.249 → 3.1.0.alpha.252
Sign up to get free protection for your applications and to get access to all the features.
- data/REVISION +1 -1
- data/VERSION +1 -1
- data/bin/scss +8 -0
- data/lib/sass/exec.rb +29 -10
- data/lib/sass/importers/filesystem.rb +1 -1
- metadata +3 -2
data/REVISION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
1d2ea6bb52c5582cecb0d3dac7221626891aa924
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.1.0.alpha.
|
1
|
+
3.1.0.alpha.252
|
data/bin/scss
ADDED
data/lib/sass/exec.rb
CHANGED
@@ -176,12 +176,15 @@ MESSAGE
|
|
176
176
|
|
177
177
|
# The `sass` executable.
|
178
178
|
class Sass < Generic
|
179
|
+
attr_reader :default_syntax
|
180
|
+
|
179
181
|
# @param args [Array<String>] The command-line arguments
|
180
182
|
def initialize(args)
|
181
183
|
super
|
182
184
|
@options[:for_engine] = {
|
183
185
|
:load_paths => ['.'] + (ENV['SASSPATH'] || '').split(File::PATH_SEPARATOR)
|
184
186
|
}
|
187
|
+
@default_syntax = :sass
|
185
188
|
end
|
186
189
|
|
187
190
|
protected
|
@@ -193,7 +196,7 @@ MESSAGE
|
|
193
196
|
super
|
194
197
|
|
195
198
|
opts.banner = <<END
|
196
|
-
Usage:
|
199
|
+
Usage: #{default_syntax} [options] [INPUT] [OUTPUT]
|
197
200
|
|
198
201
|
Description:
|
199
202
|
Converts SCSS or Sass files to CSS.
|
@@ -201,14 +204,21 @@ Description:
|
|
201
204
|
Options:
|
202
205
|
END
|
203
206
|
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
+
if @default_syntax == :sass
|
208
|
+
opts.on('--scss',
|
209
|
+
'Use the CSS-superset SCSS syntax.') do
|
210
|
+
@options[:for_engine][:syntax] = :scss
|
211
|
+
end
|
212
|
+
else
|
213
|
+
opts.on('--sass',
|
214
|
+
'Use the Indented syntax.') do
|
215
|
+
@options[:for_engine][:syntax] = :sass
|
216
|
+
end
|
207
217
|
end
|
208
218
|
opts.on('--watch', 'Watch files or directories for changes.',
|
209
219
|
'The location of the generated CSS can be set using a colon:',
|
210
|
-
|
211
|
-
|
220
|
+
" #{@default_syntax} --watch input.#{@default_syntax}:output.css",
|
221
|
+
" #{@default_syntax} --watch input-dir:output-dir") do
|
212
222
|
@options[:watch] = true
|
213
223
|
end
|
214
224
|
opts.on('--update', 'Compile files or directories to CSS.',
|
@@ -239,7 +249,7 @@ END
|
|
239
249
|
@options[:for_engine][:debug_info] = true
|
240
250
|
end
|
241
251
|
opts.on('-l', '--line-numbers', '--line-comments',
|
242
|
-
'Emit comments in the generated CSS indicating the corresponding
|
252
|
+
'Emit comments in the generated CSS indicating the corresponding source line.') do
|
243
253
|
@options[:for_engine][:line_numbers] = true
|
244
254
|
end
|
245
255
|
opts.on('-i', '--interactive',
|
@@ -290,6 +300,7 @@ END
|
|
290
300
|
output = @options[:output]
|
291
301
|
|
292
302
|
@options[:for_engine][:syntax] ||= :scss if input.is_a?(File) && input.path =~ /\.scss$/
|
303
|
+
@options[:for_engine][:syntax] ||= @default_syntax
|
293
304
|
engine =
|
294
305
|
if input.is_a?(File) && !@options[:check_syntax]
|
295
306
|
::Sass::Engine.for_file(input.path, @options[:for_engine])
|
@@ -341,8 +352,8 @@ END
|
|
341
352
|
|
342
353
|
raise <<MSG if @args.empty?
|
343
354
|
What files should I watch? Did you mean something like:
|
344
|
-
|
345
|
-
|
355
|
+
#{@default_syntax} --watch input.#{@default_syntax}:output.css
|
356
|
+
#{@default_syntax} --watch input-dir:output-dir
|
346
357
|
MSG
|
347
358
|
|
348
359
|
if !colon_path?(@args[0]) && probably_dest_dir?(@args[1])
|
@@ -355,7 +366,7 @@ MSG
|
|
355
366
|
end
|
356
367
|
raise <<MSG if err
|
357
368
|
File #{@args[1]} #{err}.
|
358
|
-
Did you mean:
|
369
|
+
Did you mean: #{@default_syntax} #{flag} #{@args[0]}:#{@args[1]}
|
359
370
|
MSG
|
360
371
|
end
|
361
372
|
|
@@ -422,6 +433,14 @@ MSG
|
|
422
433
|
end
|
423
434
|
end
|
424
435
|
|
436
|
+
class Scss < Sass
|
437
|
+
# @param args [Array<String>] The command-line arguments
|
438
|
+
def initialize(args)
|
439
|
+
super
|
440
|
+
@default_syntax = :scss
|
441
|
+
end
|
442
|
+
end
|
443
|
+
|
425
444
|
# The `sass-convert` executable.
|
426
445
|
class SassConvert < Generic
|
427
446
|
# @param args [Array<String>] The command-line arguments
|
@@ -47,7 +47,7 @@ module Sass
|
|
47
47
|
# If a full uri is passed, this removes the root from it
|
48
48
|
# otherwise returns the name unchanged
|
49
49
|
def remove_root(name)
|
50
|
-
if name.index(@root) == 0
|
50
|
+
if name.index("..") != 0 && name.index(@root) == 0
|
51
51
|
name[@root.length..-1]
|
52
52
|
else
|
53
53
|
name
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.0.alpha.
|
4
|
+
version: 3.1.0.alpha.252
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Weizenbaum
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2011-03-
|
14
|
+
date: 2011-03-23 00:00:00 -04:00
|
15
15
|
default_executable:
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
@@ -171,6 +171,7 @@ files:
|
|
171
171
|
- vendor/fssm/spec/spec_helper.rb
|
172
172
|
- bin/sass
|
173
173
|
- bin/sass-convert
|
174
|
+
- bin/scss
|
174
175
|
- test/sass/css2sass_test.rb
|
175
176
|
- test/sass/callbacks_test.rb
|
176
177
|
- test/sass/conversion_test.rb
|