less 2.5.0 → 2.5.1
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 +4 -4
- data/Changelog.md +4 -0
- data/lib/less/java_script/rhino_context.rb +16 -16
- data/lib/less/js/CHANGELOG.md +6 -0
- data/lib/less/js/README.md +1 -1
- data/lib/less/js/bower.json +2 -2
- data/lib/less/js/lib/less/index.js +1 -1
- data/lib/less/js/lib/less/to-css-visitor.js +3 -0
- data/lib/less/js/package.json +2 -2
- data/lib/less/js/test/css/debug/linenumbers-all.css +1 -1
- data/lib/less/js/test/less-test.js +2 -0
- data/lib/less/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3a4db88aefa8acebc9d23dd991e81dd607c9914
|
4
|
+
data.tar.gz: 76ec06952260ffbb08bf7bdc01233280cf6f851a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 970d9d1d41cb14a8381c4877424af2287cf2d0771b6ddc7ba994c734a47b271e49bb9a8169c91cb8304e0f10b2517e283734aed4c62bd2a9227383c6101561bb
|
7
|
+
data.tar.gz: f363f10d080ad4e04ff62b6f5678167741840b707cb7323a02f4c15d2ac78eee03335e781ec6d43d4690a0a544481c5d1b601d9bfef1054447c933d75ea6b030
|
data/Changelog.md
CHANGED
@@ -13,11 +13,11 @@ end
|
|
13
13
|
module Less
|
14
14
|
module JavaScript
|
15
15
|
class RhinoContext
|
16
|
-
|
16
|
+
|
17
17
|
def self.instance
|
18
18
|
return new # NOTE: for Rhino a context should be kept open per thread !
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
def initialize(globals = nil)
|
22
22
|
@rhino_context = Rhino::Context.new :java => true
|
23
23
|
if @rhino_context.respond_to?(:version)
|
@@ -32,7 +32,7 @@ module Less
|
|
32
32
|
def unwrap
|
33
33
|
@rhino_context
|
34
34
|
end
|
35
|
-
|
35
|
+
|
36
36
|
def exec(&block)
|
37
37
|
@rhino_context.open(&block)
|
38
38
|
rescue Rhino::JSError => e
|
@@ -41,7 +41,7 @@ module Less
|
|
41
41
|
|
42
42
|
def eval(source, options = {})
|
43
43
|
source = source.encode('UTF-8') if source.respond_to?(:encode)
|
44
|
-
|
44
|
+
|
45
45
|
source_name = options[:source_name] || "<eval>"
|
46
46
|
line_number = options[:line_number] || 1
|
47
47
|
@rhino_context.eval("(#{source})", source_name, line_number)
|
@@ -51,14 +51,14 @@ module Less
|
|
51
51
|
|
52
52
|
def call(properties, *args)
|
53
53
|
options = args.last.is_a?(::Hash) ? args.pop : {} # extract_option!
|
54
|
-
|
54
|
+
|
55
55
|
source_name = options[:source_name] || "<eval>"
|
56
56
|
line_number = options[:line_number] || 1
|
57
57
|
@rhino_context.eval(properties, source_name, line_number).call(*args)
|
58
58
|
rescue Rhino::JSError => e
|
59
59
|
handle_js_error(e)
|
60
60
|
end
|
61
|
-
|
61
|
+
|
62
62
|
def method_missing(symbol, *args)
|
63
63
|
if @rhino_context.respond_to?(symbol)
|
64
64
|
@rhino_context.send(symbol, *args)
|
@@ -66,35 +66,35 @@ module Less
|
|
66
66
|
super
|
67
67
|
end
|
68
68
|
end
|
69
|
-
|
69
|
+
|
70
70
|
private
|
71
|
-
|
71
|
+
|
72
72
|
def handle_js_error(e)
|
73
73
|
if e.value && ( e.value['message'] || e.value['type'].is_a?(String) )
|
74
74
|
raise Less::ParseError.new(e, e.value) # LessError
|
75
75
|
end
|
76
|
-
if e.unwrap.to_s =~ /missing
|
76
|
+
if e.unwrap.to_s =~ /missing opening `\(`/
|
77
77
|
raise Less::ParseError.new(e.unwrap.to_s)
|
78
78
|
end
|
79
79
|
if e.message && e.message[0, 12] == "Syntax Error"
|
80
80
|
raise Less::ParseError.new(e)
|
81
81
|
else
|
82
82
|
raise Less::Error.new(e)
|
83
|
-
end
|
83
|
+
end
|
84
84
|
end
|
85
|
-
|
85
|
+
|
86
86
|
def apply_1_8_compatibility!
|
87
87
|
# TODO rather load ecma-5.js ...
|
88
88
|
@rhino_context.eval("
|
89
89
|
// String
|
90
|
-
if ( ! String.prototype.trim ) {
|
91
|
-
String.prototype.trim = function () {
|
92
|
-
return this.replace(/^\s+|\s+$/g,'');
|
93
|
-
};
|
90
|
+
if ( ! String.prototype.trim ) {
|
91
|
+
String.prototype.trim = function () {
|
92
|
+
return this.replace(/^\s+|\s+$/g,'');
|
93
|
+
};
|
94
94
|
}
|
95
95
|
")
|
96
96
|
end
|
97
|
-
|
97
|
+
|
98
98
|
end
|
99
99
|
end
|
100
100
|
end
|
data/lib/less/js/CHANGELOG.md
CHANGED
data/lib/less/js/README.md
CHANGED
data/lib/less/js/bower.json
CHANGED
@@ -18,6 +18,9 @@
|
|
18
18
|
},
|
19
19
|
|
20
20
|
visitMixinDefinition: function (mixinNode, visitArgs) {
|
21
|
+
// mixin definitions do not get eval'd - this means they keep state
|
22
|
+
// so we have to clear that state here so it isn't used if toCSS is called twice
|
23
|
+
mixinNode.frames = [];
|
21
24
|
return [];
|
22
25
|
},
|
23
26
|
|
data/lib/less/js/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "less",
|
3
|
-
"version": "1.6.
|
3
|
+
"version": "1.6.3",
|
4
4
|
"description": "Leaner CSS",
|
5
5
|
"homepage": "http://lesscss.org",
|
6
6
|
"author": {
|
@@ -31,7 +31,7 @@
|
|
31
31
|
"test": "./test"
|
32
32
|
},
|
33
33
|
"jam": {
|
34
|
-
"main": "./dist/less-1.
|
34
|
+
"main": "./dist/less-1.6.3.js"
|
35
35
|
},
|
36
36
|
"engines": {
|
37
37
|
"node": ">=0.4.2"
|
@@ -41,7 +41,7 @@
|
|
41
41
|
.tst2 {
|
42
42
|
color: white;
|
43
43
|
}
|
44
|
-
/* line 27,
|
44
|
+
/* line 27, {path}linenumbers.less */
|
45
45
|
@media -sass-debug-info{filename{font-family:file\:\/\/{pathesc}linenumbers\.less}line{font-family:\0000327}}
|
46
46
|
.test {
|
47
47
|
color: red;
|
@@ -227,6 +227,8 @@ module.exports = function() {
|
|
227
227
|
} else {
|
228
228
|
try {
|
229
229
|
css = tree.toCSS(options);
|
230
|
+
var css2 = tree.toCSS(options); // integration test that 2nd call gets same output
|
231
|
+
if (css2 !== css) { throw new Error("css not equal to 2nd call"); }
|
230
232
|
callback(null, css);
|
231
233
|
} catch (e) {
|
232
234
|
callback(e);
|
data/lib/less/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: less
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charles Lowell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commonjs
|