Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 373
- Log:
Initial import of Radiant 0.9.1, which is now packaged as a gem. This is an
import of the tagged 0.9.1 source checked out from GitHub, which isn't quite
the same as the gem distribution - but it doesn't seem to be available in an
archived form and the installed gem already has modifications, so this is
the closest I can get.
- Author:
- rool
- Date:
- Mon Mar 21 13:40:05 +0000 2011
- Size:
- 1889 Bytes
1 | module Sass |
2 | module Tree |
3 | # A static node that wraps the {Sass::Tree} for an `@import`ed file. |
4 | # It doesn't have a functional purpose other than to add the `@import`ed file |
5 | # to the backtrace if an error occurs. |
6 | class ImportNode < Node |
7 | # @param imported_filename [String] The name of the imported file |
8 | def initialize(imported_filename) |
9 | @imported_filename = imported_filename |
10 | super() |
11 | end |
12 | |
13 | # Computes the CSS for the imported file. |
14 | # |
15 | # @param args [Array] Ignored |
16 | def to_s(*args) |
17 | @to_s ||= (style == :compressed ? super().strip : super()) |
18 | rescue Sass::SyntaxError => e |
19 | e.add_backtrace_entry(@filename) |
20 | raise e |
21 | end |
22 | |
23 | def invisible?; to_s.empty?; end |
24 | |
25 | protected |
26 | |
27 | # Parses the imported file |
28 | # and runs the dynamic Sass for it. |
29 | # |
30 | # @param environment [Sass::Environment] The lexical environment containing |
31 | # variable and mixin values |
32 | def perform!(environment) |
33 | return unless full_filename = import |
34 | self.children = Sass::Files.tree_for(full_filename, @options).children |
35 | self.children = perform_children(environment) |
36 | rescue Sass::SyntaxError => e |
37 | e.add_backtrace_entry(@filename) |
38 | raise e |
39 | end |
40 | |
41 | private |
42 | |
43 | def import_paths |
44 | paths = (@options[:load_paths] || []).dup |
45 | paths.unshift(File.dirname(@options[:filename])) if @options[:filename] |
46 | paths |
47 | end |
48 | |
49 | def import |
50 | begin |
51 | full_filename = Sass::Files.find_file_to_import(@imported_filename, import_paths) |
52 | rescue Exception => e |
53 | raise SyntaxError.new(e.message, self.line) |
54 | end |
55 | |
56 | if full_filename =~ /\.css$/ |
57 | @to_s = "@import url(#{full_filename});" |
58 | return false |
59 | end |
60 | |
61 | return full_filename |
62 | end |
63 | end |
64 | end |
65 | end |