snakeskin
Advanced tools
Comparing version 6.0.6 to 6.1.0
{ | ||
"name": "Snakeskin", | ||
"main": "build/snakeskin.min.js", | ||
"version": "6.0.6", | ||
"version": "6.1.0", | ||
"homepage": "https://github.com/kobezzza/Snakeskin", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
/*! | ||
* Snakeskin v6.0.6 (live) | ||
* Snakeskin v6.1.0 (live) | ||
* https://github.com/kobezzza/Snakeskin | ||
@@ -8,3 +8,3 @@ * | ||
* | ||
* Date: Thu, 23 Oct 2014 12:32:59 GMT | ||
* Date: Thu, 23 Oct 2014 14:36:34 GMT | ||
*/ | ||
@@ -37,3 +37,3 @@ | ||
*/ | ||
VERSION: [6, 0, 6], | ||
VERSION: [6, 1, 0], | ||
@@ -40,0 +40,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
/*! Snakeskin v6.0.6 (live) | https://github.com/kobezzza/Snakeskin/blob/master/LICENSE */Array.isArray=Array.isArray||function(k){return"[object Array]"==={}.toString.call(k)};String.prototype.trim=String.prototype.trim||function(){for(var k=this.replace(/^\s\s*/,""),l=k.length,m=/\s/;m.test(k.charAt(--l)););return k.substring(0,l+1)};var e={VERSION:[6,0,6],a:{},Filters:{},Vars:{},LocalVars:{},cache:{}}; | ||
/*! Snakeskin v6.1.0 (live) | https://github.com/kobezzza/Snakeskin/blob/master/LICENSE */Array.isArray=Array.isArray||function(k){return"[object Array]"==={}.toString.call(k)};String.prototype.trim=String.prototype.trim||function(){for(var k=this.replace(/^\s\s*/,""),l=k.length,m=/\s/;m.test(k.charAt(--l)););return k.substring(0,l+1)};var e={VERSION:[6,1,0],a:{},Filters:{},Vars:{},LocalVars:{},cache:{}}; | ||
(function(){function k(a){return m[a]}var l="undefined"===typeof window&&"undefined"!==typeof exports;e.importFilters=function(a,f){var d=e.Filters;if(f)for(var c=f.split("."),g=-1;++g<c.length;)d[c[g]]||(d[c[g]]={}),d=d[c[g]];for(var h in a)a.hasOwnProperty(h)&&(d[h]=a[h])};var m={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},p=/[&<>"'\/]/g,q=/([$\w]\s*=\s*)([^"'\s>=]+)/g,r=/(javascript)(:|;)/;e.Filters.html=function(a,f,d){a=String(a);f&&d&&(a=a.replace(q,'$1"$2"'));a= | ||
@@ -3,0 +3,0 @@ a.replace(p,k);f&&(a=a.replace(r,"$1$2"));return a};e.Filters.undef=function(a){return void 0!==a?a:""};(function(){function a(b){return f[b]}var f={"&":"&","<":"<",">":">",""":'"',"'":"'","/":"/"},d=/&|<|>|"|'|//g;e.Filters.uhtml=function(b){return String(b).replace(d,a)};var c=/<\/?[^>]+>/g;e.Filters.stripTags=function(b){return String(b).replace(c,"")};var g=/%5B/g,h=/%5D/g;e.Filters.uri=function(b){return encodeURI(String(b)).replace(g,"[").replace(h, |
@@ -0,1 +1,5 @@ | ||
## v6.1.0 | ||
- [x] Добавлена поддержка маски для директивы `include`. | ||
## v6.0.6 | ||
@@ -2,0 +6,0 @@ |
@@ -220,3 +220,7 @@ /*! | ||
} else { | ||
parts = decl.command.split(INLINE_COMMAND); | ||
parts = this.replaceDangerBlocks(decl.command).split(INLINE_COMMAND); | ||
for (var z = -1; ++z < parts.length;) { | ||
parts[z] = this.pasteDangerBlocks(parts[z]); | ||
} | ||
} | ||
@@ -314,5 +318,10 @@ | ||
var escape = false; | ||
var sComment = false, | ||
inline = false; | ||
var bOpen = false, | ||
bEnd = true, | ||
bEscape = false; | ||
var concatLine = false, | ||
@@ -322,5 +331,10 @@ nmBrk = null; | ||
for (var j = i - 1; ++j < str.length;) { | ||
var currentEscape = escape; | ||
var el = str.charAt(j), | ||
next2Str = el + str.charAt(j + 1); | ||
if (el === '\\' && !bOpen) { | ||
escape = !escape; | ||
} | ||
length++; | ||
@@ -378,15 +392,30 @@ if (nextLineRgxp.test(el)) { | ||
} else { | ||
if (comment) { | ||
comment = next2Str !== MULT_COMMENT_END; | ||
if (comment || !bOpen && !currentEscape) { | ||
if (comment) { | ||
comment = next2Str !== MULT_COMMENT_END; | ||
} else if (!sComment) { | ||
comment = next2Str === MULT_COMMENT_START; | ||
} else if (!sComment) { | ||
comment = next2Str === MULT_COMMENT_START; | ||
if (!comment) { | ||
sComment = next2Str + str.charAt(j + 2) === SINGLE_COMMENT; | ||
if (!comment) { | ||
sComment = next2Str + str.charAt(j + 2) === SINGLE_COMMENT; | ||
} | ||
} | ||
} | ||
if (dir && !inline && !comment && !sComment) { | ||
inline = str.substring(j, j + INLINE_COMMAND.length) === INLINE_COMMAND; | ||
if (!comment && !sComment) { | ||
if (dir && !inline && !bOpen) { | ||
inline = str.substring(j, j + INLINE_COMMAND.length) === INLINE_COMMAND; | ||
} | ||
if (escapeMap[el] && (el === '/' ? bEnd : true) && !bOpen) { | ||
bOpen = el; | ||
} else if (bOpen && (el === '\\' || bEscape)) { | ||
bEscape = !bEscape; | ||
} else if (escapeMap[el] && bOpen === el && !bEscape) { | ||
bOpen = false; | ||
bEnd = false; | ||
} | ||
} | ||
@@ -393,0 +422,0 @@ |
@@ -11,3 +11,3 @@ //#include ./es5shim.live.js | ||
*/ | ||
VERSION: [6, 0, 6], | ||
VERSION: [6, 1, 0], | ||
@@ -14,0 +14,0 @@ /** |
@@ -19,3 +19,4 @@ var fsStack = []; | ||
var fs = require('fs'), | ||
path = require('path'); | ||
path = require('path'), | ||
glob = require('glob')['sync']; | ||
@@ -29,26 +30,30 @@ var s = ADV_LEFT_BLOCK + LEFT_BLOCK, | ||
var src = path['normalize'](path['resolve']( | ||
var src = path['resolve']( | ||
path['dirname'](base), | ||
url + (extname ? '' : '.ss') | ||
)); | ||
); | ||
if (!include[src]) { | ||
include[src] = true; | ||
var file = fs['readFileSync'](src).toString(); | ||
(/\*/.test(src) ? glob(src) : [src]).forEach(function(src) { | ||
src = path['normalize'](src); | ||
fsStack.push( | ||
(("" + s) + ("__setFile__ " + (escapeBackslash(src))) + ("" + e) + "") + | ||
if (!include[src]) { | ||
include[src] = true; | ||
var file = fs['readFileSync'](src).toString(); | ||
(opt_type ? | ||
(("" + s) + ("__setSSFlag__ renderAs '" + opt_type) + ("'" + e) + "") : '') + | ||
fsStack.push( | ||
(("" + s) + ("__setFile__ " + (escapeBackslash(src))) + ("" + e) + "") + | ||
("" + (/^[ \t]*(?:\r\n|\r|\n)/.test(file) ? '' : nl)) + | ||
(opt_type ? | ||
(("" + s) + ("__setSSFlag__ renderAs '" + opt_type) + ("'" + e) + "") : '') + | ||
file + | ||
("" + (/^[ \t]*(?:\r\n|\r|\n)/.test(file) ? '' : nl)) + | ||
("" + (/(?:\r\n|\r|\n)[ \t]*$/.test(file) ? '' : (("" + nl) + ("" + s) + ("__cutLine__" + e) + ""))) + | ||
(("" + s) + ("__endSetFile__" + e) + "") | ||
); | ||
} | ||
file + | ||
("" + (/(?:\r\n|\r|\n)[ \t]*$/.test(file) ? '' : (("" + nl) + ("" + s) + ("__cutLine__" + e) + ""))) + | ||
(("" + s) + ("__endSetFile__" + e) + "") | ||
); | ||
} | ||
}); | ||
return true; | ||
@@ -55,0 +60,0 @@ |
{ | ||
"name": "snakeskin", | ||
"version": "6.0.6", | ||
"version": "6.1.0", | ||
"main": "snakeskin.js", | ||
@@ -17,2 +17,3 @@ "bin": { | ||
"dependencies": { | ||
"glob": "~4", | ||
"commander": "~2", | ||
@@ -19,0 +20,0 @@ "monocle": "~1", |
@@ -1,3 +0,3 @@ | ||
/* Snakeskin v6.0.6, key <commonJS,false, | ||
,xml,false,false,,stringConcat,true,true,true,,false,true,i18n>, label <1413886610309>, includes <>, generated at <1414067694215>. | ||
/* Snakeskin v6.1.0, key <commonJS,false, | ||
,xml,false,false,,stringConcat,true,true,true,,false,true,i18n>, label <1413886610309>, includes <>, generated at <1414075005319>. | ||
This code is generated automatically, don't alter it. */ | ||
@@ -25,3 +25,3 @@ (function() { | ||
__STR__, __TMP__, __J__; | ||
var $_ = __LOCAL__['$_238c3']; /* Snakeskin template: test; asserts */ | ||
var $_ = __LOCAL__['$_8ad84']; /* Snakeskin template: test; asserts */ | ||
this.test = function(asserts) { | ||
@@ -28,0 +28,0 @@ var __THIS__ = this, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1294017
25379
4
48
+ Addedglob@~4
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedglob@4.5.3(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedminimatch@2.0.10(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedwrappy@1.0.2(transitive)