From 39cb151581ac75d4ef710235e945626d257edf4e Mon Sep 17 00:00:00 2001 From: Zswang Date: Fri, 17 Oct 2014 11:32:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=20map=20=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 5 ++++- bower.json | 2 +- dist/jhtmls.min.js | 3 +-- dist/jhtmls.min.js.map | 1 - package.json | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) delete mode 100644 dist/jhtmls.min.js.map diff --git a/.travis.yml b/.travis.yml index 9457120..ffb945c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,7 @@ language: node_js node_js: - 0.11 - - 0.10 \ No newline at end of file + - 0.10 +script: + - npm run lint + - npm run test \ No newline at end of file diff --git a/bower.json b/bower.json index cebcefc..a6b78ba 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "jhtmls", - "version": "0.0.6", + "version": "0.0.7", "homepage": "https://github.com/zswang/jhtmls", "authors": [ "Zswang " diff --git a/dist/jhtmls.min.js b/dist/jhtmls.min.js index 5a405cd..3590b22 100644 --- a/dist/jhtmls.min.js +++ b/dist/jhtmls.min.js @@ -1,2 +1 @@ -var jhtmls="undefined"==typeof exports?jhtmls||{}:exports;void function(e){"use strict";function n(e){return String(e).replace(/["<>& ]/g,function(e){return"&"+u[e]+";"})}function t(e){var n=[];return n.push("with(this){"),n.push(e.replace(/<(script|style)[^>]*>[\s\S]*?<\/\1>/g,function(e){return['!#{unescape("',escape(e),'")}'].join("")}).replace(/[\r\n]+/g,"\n").replace(/^\n+|\s+$/gm,"").replace(/^([ \w\t_$]*([^&\^?|\n\w\/'"{}\[\]+\-():; \t=\.$_]|:\/\/).*$|^(?!\s*(else|do|try|finally|void|typeof\s[\w$_]*)\s*$)[^'":;{}()\n|=&\/^?]+$)\s?/gm,function(e){return e=e.replace(/&none;/g,"").replace(/["'\\]/g,"\\$&").replace(/\n/g,"\\n").replace(/(!?#)\{(.*?)\}|(!?\$)([a-z_]+\w*(?:\.[a-z_]+\w*)*)/g,function(e,n,t,r,u){if(r&&(n=r,t=u),!t)return"";t=t.replace(/\\n/g,"\n").replace(/\\([\\'"])/g,"$1");var o=/^[a-z$][\w+$]+$/i.test(t)&&!/^(true|false|NaN|null|this)$/.test(t);return["',",o?["typeof ",t,"==='undefined'?'':"].join(""):"","#"===n||"$"===n?"_encode_":"","(",t,"),'"].join("")}),e=["'",e,"'"].join("").replace(/^'',|,''$/g,""),e?["_output_.push(",e,");"].join(""):""})),n.push("}"),new Function("_output_","_encode_","helper","jhtmls",n.join(""))}function r(r,u,o){"function"==typeof r&&(r=String(r).replace(/^[^\{]*\{\s*\/\*!?[ \f\t\v]*\n?|[ \f\t\v]*\*\/[;|\s]*\}$/g,""));var i=t(r),c=function(t,r){var u=[];return"undefined"==typeof r&&(r=function(t){i.call(t,u,n,r,e)}),i.call(t,u,n,r,e),u.join("")};return arguments.length<=1?c:c(u,o)}var u={'"':"quot","<":"lt",">":"gt","&":"amp"," ":"nbsp"};e.render=r}(jhtmls); -//# sourceMappingURL=jhtmls.min.js.map \ No newline at end of file +var jhtmls="undefined"==typeof exports?jhtmls||{}:exports;void function(e){"use strict";function n(e){return String(e).replace(/["<>& ]/g,function(e){return"&"+u[e]+";"})}function t(e){var n=[];return n.push("with(this){"),n.push(e.replace(/<(script|style)[^>]*>[\s\S]*?<\/\1>/g,function(e){return['!#{unescape("',escape(e),'")}'].join("")}).replace(/[\r\n]+/g,"\n").replace(/^\n+|\s+$/gm,"").replace(/^([ \w\t_$]*([^&\^?|\n\w\/'"{}\[\]+\-():; \t=\.$_]|:\/\/).*$|^(?!\s*(else|do|try|finally|void|typeof\s[\w$_]*)\s*$)[^'":;{}()\n|=&\/^?]+$)\s?/gm,function(e){return e=e.replace(/&none;/g,"").replace(/["'\\]/g,"\\$&").replace(/\n/g,"\\n").replace(/(!?#)\{(.*?)\}|(!?\$)([a-z_]+\w*(?:\.[a-z_]+\w*)*)/g,function(e,n,t,r,u){if(r&&(n=r,t=u),!t)return"";t=t.replace(/\\n/g,"\n").replace(/\\([\\'"])/g,"$1");var o=/^[a-z$][\w+$]+$/i.test(t)&&!/^(true|false|NaN|null|this)$/.test(t);return["',",o?["typeof ",t,"==='undefined'?'':"].join(""):"","#"===n||"$"===n?"_encode_":"","(",t,"),'"].join("")}),e=["'",e,"'"].join("").replace(/^'',|,''$/g,""),e?["_output_.push(",e,");"].join(""):""})),n.push("}"),new Function("_output_","_encode_","helper","jhtmls",n.join(""))}function r(r,u,o){"function"==typeof r&&(r=String(r).replace(/^[^\{]*\{\s*\/\*!?[ \f\t\v]*\n?|[ \f\t\v]*\*\/[;|\s]*\}$/g,""));var i=t(r),c=function(t,r){var u=[];return"undefined"==typeof r&&(r=function(t){i.call(t,u,n,r,e)}),i.call(t,u,n,r,e),u.join("")};return arguments.length<=1?c:c(u,o)}var u={'"':"quot","<":"lt",">":"gt","&":"amp"," ":"nbsp"};e.render=r}(jhtmls); \ No newline at end of file diff --git a/dist/jhtmls.min.js.map b/dist/jhtmls.min.js.map deleted file mode 100644 index a46c136..0000000 --- a/dist/jhtmls.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dist/jhtmls.min.js","sources":["?"],"names":["jhtmls","exports","encodeHTML","text","String","replace","all","htmlEncodeDict","build","template","body","push","escape","join","expression","flag","value","flag2","value2","identifier","test","Function","render","data","helper","fn","format","d","h","output","call","arguments","length","\"","<",">","&"," "],"mappings":"AAAA,GAAIA,QAA4B,mBAAZC,SAA0BD,WAAeC,YAExD,UAASA,GACZ,YAoBA,SAASC,GAAWC,GAClB,MAAOC,QAAOD,GAAME,QAAQ,WAAY,SAASC,GAC/C,MAAO,IAAMC,EAAeD,GAAO,MAgBvC,QAASE,GAAMC,GACb,GAAIC,KAwDJ,OAvDAA,GAAKC,KAAK,eACVD,EAAKC,KAAKF,EACPJ,QAA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IPpC,GAAQqB,OAASA,GAEjBtB"} \ No newline at end of file diff --git a/package.json b/package.json index d95e884..2efb1e5 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "jhtmls", "title": "jhtmls", "description": "JS and HTML alternate javascript template", - "version": "0.0.6", + "version": "0.0.7", "homepage": "https://github.com/zswang/jhtmls", "main": "src/jhtmls.js", "author": { @@ -31,7 +31,7 @@ }, "scripts": { "test": "mocha -R spec && npm run coverage", - "compress": "uglifyjs src/jhtmls.js -o dist/jhtmls.min.js --source-map dist/jhtmls.min.js.map --source-map-url jhtmls.min.js.map -p 5 -c -m", + "dist": "uglifyjs src/jhtmls.js -o dist/jhtmls.min.js -p 5 -c -m", "lint": "jshint src/*.js *.json" } }