stylus 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -3
- data/CHANGELOG.md +5 -0
- data/lib/stylus.rb +9 -5
- data/lib/stylus/runner.js +20 -0
- data/lib/stylus/version.rb +1 -1
- metadata +105 -65
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
## Changelog
|
2
2
|
|
3
|
+
### 0.2.2 (2011-09-14)
|
4
|
+
[Compare view](https://github.com/lucasmazza/ruby-stylus/compare/v0.2.1...v0.2.2)
|
5
|
+
|
6
|
+
* ExecJS 1.2.5+ compatibility: Using a custom `ExternalRuntime`.
|
7
|
+
|
3
8
|
### 0.2.1 (2011-08-30)
|
4
9
|
[Compare view](https://github.com/lucasmazza/ruby-stylus/compare/v0.2.0...v0.2.1)
|
5
10
|
|
data/lib/stylus.rb
CHANGED
@@ -36,7 +36,7 @@ module Stylus
|
|
36
36
|
end
|
37
37
|
alias :plugin :use
|
38
38
|
|
39
|
-
# Retrieves all the registered plugins
|
39
|
+
# Retrieves all the registered plugins.
|
40
40
|
def plugins
|
41
41
|
@@plugins
|
42
42
|
end
|
@@ -77,7 +77,7 @@ module Stylus
|
|
77
77
|
end
|
78
78
|
|
79
79
|
# Returns a `Hash` of the given `options` merged with the default configuration.
|
80
|
-
# It also concats the global load path with a given `
|
80
|
+
# It also concats the global load path with a given `:paths` option.
|
81
81
|
def merge_options(options)
|
82
82
|
_paths = options.delete(:paths)
|
83
83
|
options = defaults.merge(options)
|
@@ -106,10 +106,14 @@ module Stylus
|
|
106
106
|
File.read(File.expand_path('../stylus/compiler.js',__FILE__))
|
107
107
|
end
|
108
108
|
|
109
|
-
#
|
110
|
-
#
|
109
|
+
# `ExecJS` 1.2.5+ doesn't support `require` statements on node anymore,
|
110
|
+
# so we use a new instance of the `ExternalRuntime` with the old runner script.
|
111
111
|
def backend
|
112
|
-
@@_backend ||= ExecJS::
|
112
|
+
@@_backend ||= ExecJS::ExternalRuntime.new(
|
113
|
+
:name => 'Node.js (V8)',
|
114
|
+
:command => ["nodejs", "node"],
|
115
|
+
:runner_path => File.expand_path("../stylus/runner.js", __FILE__)
|
116
|
+
)
|
113
117
|
end
|
114
118
|
end
|
115
119
|
|
@@ -0,0 +1,20 @@
|
|
1
|
+
(function(program, execJS) { execJS(program) })(function() { #{source}
|
2
|
+
}, function(program) {
|
3
|
+
var output, print = function(string) {
|
4
|
+
process.stdout.write('' + string);
|
5
|
+
};
|
6
|
+
try {
|
7
|
+
result = program();
|
8
|
+
if (typeof result == 'undefined' && result !== null) {
|
9
|
+
print('["ok"]');
|
10
|
+
} else {
|
11
|
+
try {
|
12
|
+
print(JSON.stringify(['ok', result]));
|
13
|
+
} catch (err) {
|
14
|
+
print('["err"]');
|
15
|
+
}
|
16
|
+
}
|
17
|
+
} catch (err) {
|
18
|
+
print(JSON.stringify(['err', '' + err]));
|
19
|
+
}
|
20
|
+
});
|
data/lib/stylus/version.rb
CHANGED
metadata
CHANGED
@@ -1,89 +1,119 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: stylus
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 2
|
9
|
+
- 2
|
10
|
+
version: 0.2.2
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Lucas Mazza
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
|
18
|
+
date: 2011-09-14 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: execjs
|
16
|
-
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
24
|
none: false
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
version: "0"
|
22
32
|
type: :runtime
|
23
|
-
|
24
|
-
|
25
|
-
- !ruby/object:Gem::Dependency
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
26
35
|
name: rspec
|
27
|
-
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
38
|
none: false
|
29
|
-
requirements:
|
39
|
+
requirements:
|
30
40
|
- - ~>
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
hash: 3
|
43
|
+
segments:
|
44
|
+
- 2
|
45
|
+
- 0
|
46
|
+
version: "2.0"
|
33
47
|
type: :development
|
34
|
-
|
35
|
-
|
36
|
-
- !ruby/object:Gem::Dependency
|
48
|
+
version_requirements: *id002
|
49
|
+
- !ruby/object:Gem::Dependency
|
37
50
|
name: railties
|
38
|
-
|
51
|
+
prerelease: false
|
52
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
39
53
|
none: false
|
40
|
-
requirements:
|
54
|
+
requirements:
|
41
55
|
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
hash: 3
|
58
|
+
segments:
|
59
|
+
- 3
|
60
|
+
- 1
|
61
|
+
- 0
|
43
62
|
version: 3.1.0
|
44
63
|
type: :development
|
45
|
-
|
46
|
-
|
47
|
-
- !ruby/object:Gem::Dependency
|
64
|
+
version_requirements: *id003
|
65
|
+
- !ruby/object:Gem::Dependency
|
48
66
|
name: tzinfo
|
49
|
-
|
67
|
+
prerelease: false
|
68
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
50
69
|
none: false
|
51
|
-
requirements:
|
52
|
-
- -
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
hash: 3
|
74
|
+
segments:
|
75
|
+
- 0
|
76
|
+
version: "0"
|
55
77
|
type: :development
|
56
|
-
|
57
|
-
|
58
|
-
- !ruby/object:Gem::Dependency
|
78
|
+
version_requirements: *id004
|
79
|
+
- !ruby/object:Gem::Dependency
|
59
80
|
name: yajl-ruby
|
60
|
-
|
81
|
+
prerelease: false
|
82
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
61
83
|
none: false
|
62
|
-
requirements:
|
63
|
-
- -
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
|
84
|
+
requirements:
|
85
|
+
- - ">="
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
hash: 3
|
88
|
+
segments:
|
89
|
+
- 0
|
90
|
+
version: "0"
|
66
91
|
type: :development
|
67
|
-
|
68
|
-
|
69
|
-
- !ruby/object:Gem::Dependency
|
92
|
+
version_requirements: *id005
|
93
|
+
- !ruby/object:Gem::Dependency
|
70
94
|
name: rocco
|
71
|
-
|
95
|
+
prerelease: false
|
96
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
72
97
|
none: false
|
73
|
-
requirements:
|
74
|
-
- -
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
|
98
|
+
requirements:
|
99
|
+
- - ">="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
hash: 3
|
102
|
+
segments:
|
103
|
+
- 0
|
104
|
+
version: "0"
|
77
105
|
type: :development
|
78
|
-
|
79
|
-
version_requirements: *2157699620
|
106
|
+
version_requirements: *id006
|
80
107
|
description: Bridge library to compile .styl stylesheets from ruby code.
|
81
|
-
email:
|
108
|
+
email:
|
82
109
|
- luc4smazza@gmail.com
|
83
110
|
executables: []
|
111
|
+
|
84
112
|
extensions: []
|
113
|
+
|
85
114
|
extra_rdoc_files: []
|
86
|
-
|
115
|
+
|
116
|
+
files:
|
87
117
|
- .gitignore
|
88
118
|
- .travis.yml
|
89
119
|
- CHANGELOG.md
|
@@ -97,6 +127,7 @@ files:
|
|
97
127
|
- lib/stylus.rb
|
98
128
|
- lib/stylus/compiler.js
|
99
129
|
- lib/stylus/railtie.rb
|
130
|
+
- lib/stylus/runner.js
|
100
131
|
- lib/stylus/tilt.rb
|
101
132
|
- lib/stylus/version.rb
|
102
133
|
- spec/fixtures/compressed.css
|
@@ -123,29 +154,38 @@ files:
|
|
123
154
|
- stylus.gemspec
|
124
155
|
homepage: https://github.com/lucasmazza/ruby-stylus
|
125
156
|
licenses: []
|
157
|
+
|
126
158
|
post_install_message:
|
127
159
|
rdoc_options: []
|
128
|
-
|
160
|
+
|
161
|
+
require_paths:
|
129
162
|
- lib
|
130
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
163
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
131
164
|
none: false
|
132
|
-
requirements:
|
133
|
-
- -
|
134
|
-
- !ruby/object:Gem::Version
|
135
|
-
|
136
|
-
|
165
|
+
requirements:
|
166
|
+
- - ">="
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
hash: 3
|
169
|
+
segments:
|
170
|
+
- 0
|
171
|
+
version: "0"
|
172
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
173
|
none: false
|
138
|
-
requirements:
|
139
|
-
- -
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
|
174
|
+
requirements:
|
175
|
+
- - ">="
|
176
|
+
- !ruby/object:Gem::Version
|
177
|
+
hash: 3
|
178
|
+
segments:
|
179
|
+
- 0
|
180
|
+
version: "0"
|
142
181
|
requirements: []
|
182
|
+
|
143
183
|
rubyforge_project:
|
144
184
|
rubygems_version: 1.8.10
|
145
185
|
signing_key:
|
146
186
|
specification_version: 3
|
147
187
|
summary: Ruby Stylus Compiler
|
148
|
-
test_files:
|
188
|
+
test_files:
|
149
189
|
- spec/fixtures/compressed.css
|
150
190
|
- spec/fixtures/compressed.styl
|
151
191
|
- spec/fixtures/import.css
|