gonzales-pe
Advanced tools
Comparing version 2.0.2 to 3.0.0-1
@@ -591,8 +591,6 @@ ### 1. Gonzales AST — Abstract Syntax Tree | ||
Interpolated variable. | ||
Valid only for less. | ||
For scss and sass: | ||
``` | ||
#{$nani} | ||
@{nani} | ||
@@ -605,13 +603,19 @@ ↓ | ||
For less: | ||
#### interpolation | ||
Interpolated expression | ||
Valid only for scss and sass. | ||
``` | ||
@{nani} | ||
#{$nani} | ||
↓ | ||
['interpolatedVariable', | ||
['ident', 'nani']] | ||
['interpolation', | ||
['variable', | ||
['ident', 'nani']]] | ||
``` | ||
#### loop | ||
@@ -618,0 +622,0 @@ |
@@ -8,3 +8,3 @@ function astToCSS(options) { | ||
var _m_simple = { | ||
'attrselector': 1, 'combinator': 1, 'ident': 1, 'nth': 1, 'number': 1, | ||
'attrselector': 1, 'combinator': 1, 'nth': 1, 'number': 1, | ||
'operator': 1, 'raw': 1, 's': 1, 'string': 1, 'unary': 1, 'unknown': 1 | ||
@@ -14,3 +14,4 @@ }, | ||
'atruleb': 1, 'atrulerq': 1, 'atrulers': 1, 'atrules': 1,'condition': 1, | ||
'declaration': 1, 'dimension': 1, 'filterv': 1, 'include': 1, | ||
'declaration': 1, 'dimension': 1, 'filterv': 1, 'function': 1, | ||
'ident': 1, 'include': 1, | ||
'loop': 1, 'mixin': 1, 'selector': 1, 'progid': 1, 'property': 1, | ||
@@ -35,3 +36,3 @@ 'ruleset': 1, 'simpleselector': 1, 'stylesheet': 1, 'value': 1 | ||
i = i === undefined ? (hasInfo? 2 : 1) : i; | ||
for (; i < t.length; i++) s += _t(t[i]); | ||
for (; i < t.length; i++) s += typeof t[i] === 'string' ? t[i] : _t(t[i]); | ||
return s; | ||
@@ -82,5 +83,2 @@ } | ||
}, | ||
'function': function(t) { | ||
return _simple(t[hasInfo? 2 : 1]) + '(' + _composite(t[hasInfo? 3: 2]) + ')'; | ||
}, | ||
'important': function(t) { | ||
@@ -90,4 +88,7 @@ return '!' + _composite(t) + 'important'; | ||
'interpolatedVariable': function(t) { | ||
return (syntax === 'less' ? '@{' : '#\{$') + _t(t[hasInfo? 2 : 1]) + '}'; | ||
return '@{' + _t(t[hasInfo? 2 : 1]) + '}'; | ||
}, | ||
'interpolation': function(t) { | ||
return '#{' + _t(t[hasInfo? 2 : 1]) + '}'; | ||
}, | ||
'nthselector': function(t) { | ||
@@ -94,0 +95,0 @@ return ':' + _simple(t[hasInfo? 2 : 1]) + '(' + _composite(t, hasInfo? 3 : 2) + ')'; |
{ | ||
"name": "gonzales-pe", | ||
"description": "Gonzales Preprocessor Edition (fast CSS parser)", | ||
"version": "2.0.2", | ||
"version": "3.0.0-1", | ||
"homepage": "http://github.com/tonyganch/gonzales-pe", | ||
@@ -19,7 +19,9 @@ "bugs": "http://github.com/tonyganch/gonzales-pe/issues", | ||
"scripts": { | ||
"test": "(make && mkdir -p log && node ./test/test.js) | tee ./log/test.log" | ||
"test": "(make && mkdir -p log && node ./test/mocha.js) | tee ./log/test.log" | ||
}, | ||
"devDependencies": { | ||
"benchmark": "~1.0.0", | ||
"microtime": "~0.3.3" | ||
"coffee-script": "latest", | ||
"microtime": "~0.3.3", | ||
"mocha": "latest" | ||
}, | ||
@@ -26,0 +28,0 @@ "engines": { |
@@ -8,3 +8,3 @@ function astToCSS(options) { | ||
var _m_simple = { | ||
'attrselector': 1, 'combinator': 1, 'ident': 1, 'nth': 1, 'number': 1, | ||
'attrselector': 1, 'combinator': 1, 'nth': 1, 'number': 1, | ||
'operator': 1, 'raw': 1, 's': 1, 'string': 1, 'unary': 1, 'unknown': 1 | ||
@@ -14,3 +14,4 @@ }, | ||
'atruleb': 1, 'atrulerq': 1, 'atrulers': 1, 'atrules': 1,'condition': 1, | ||
'declaration': 1, 'dimension': 1, 'filterv': 1, 'include': 1, | ||
'declaration': 1, 'dimension': 1, 'filterv': 1, 'function': 1, | ||
'ident': 1, 'include': 1, | ||
'loop': 1, 'mixin': 1, 'selector': 1, 'progid': 1, 'property': 1, | ||
@@ -35,3 +36,3 @@ 'ruleset': 1, 'simpleselector': 1, 'stylesheet': 1, 'value': 1 | ||
i = i === undefined ? (hasInfo? 2 : 1) : i; | ||
for (; i < t.length; i++) s += _t(t[i]); | ||
for (; i < t.length; i++) s += typeof t[i] === 'string' ? t[i] : _t(t[i]); | ||
return s; | ||
@@ -82,5 +83,2 @@ } | ||
}, | ||
'function': function(t) { | ||
return _simple(t[hasInfo? 2 : 1]) + '(' + _composite(t[hasInfo? 3: 2]) + ')'; | ||
}, | ||
'important': function(t) { | ||
@@ -90,4 +88,7 @@ return '!' + _composite(t) + 'important'; | ||
'interpolatedVariable': function(t) { | ||
return (syntax === 'less' ? '@{' : '#\{$') + _t(t[hasInfo? 2 : 1]) + '}'; | ||
return '@{' + _t(t[hasInfo? 2 : 1]) + '}'; | ||
}, | ||
'interpolation': function(t) { | ||
return '#{' + _t(t[hasInfo? 2 : 1]) + '}'; | ||
}, | ||
'nthselector': function(t) { | ||
@@ -94,0 +95,0 @@ return ':' + _simple(t[hasInfo? 2 : 1]) + '(' + _composite(t, hasInfo? 3 : 2) + ')'; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
405202
10288
4
1