From 577ded52721bdc12f63ea689c825a6accc5925a7 Mon Sep 17 00:00:00 2001 From: Faisal Salman Date: Tue, 4 Nov 2014 18:04:49 +0700 Subject: [PATCH] Move minified script under /dist directory --- build/build.sh | 2 +- dist/ua-parser.min.js | 1 + src/ua-parser.min.js | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 dist/ua-parser.min.js delete mode 100644 src/ua-parser.min.js diff --git a/build/build.sh b/build/build.sh index 3f05e87..6ca6f32 100755 --- a/build/build.sh +++ b/build/build.sh @@ -33,5 +33,5 @@ echo "Running test..." $MOCHA_DIR -R nyan test/test.js echo "Minifying script..." -$UGLIFY_DIR src/ua-parser.js > src/ua-parser.min.js +$UGLIFY_DIR src/ua-parser.js > dist/ua-parser.min.js echo "OK" diff --git a/dist/ua-parser.min.js b/dist/ua-parser.min.js new file mode 100644 index 0000000..0255463 --- /dev/null +++ b/dist/ua-parser.min.js @@ -0,0 +1 @@ +(function(window,undefined){"use strict";var LIBVERSION="0.7.1",EMPTY="",UNKNOWN="?",FUNC_TYPE="function",UNDEF_TYPE="undefined",OBJ_TYPE="object",MAJOR="major",MODEL="model",NAME="name",TYPE="type",VENDOR="vendor",VERSION="version",ARCHITECTURE="architecture",CONSOLE="console",MOBILE="mobile",TABLET="tablet",SMARTTV="smarttv",WEARABLE="wearable",EMBEDDED="embedded";var util={extend:function(regexes,extensions){for(var i in extensions){if("browser cpu device engine os".indexOf(i)!==-1&&extensions[i].length%2===0){regexes[i]=extensions[i].concat(regexes[i])}}return regexes},has:function(str1,str2){if(typeof str1==="string"){return str2.toLowerCase().indexOf(str1.toLowerCase())!==-1}},lowerize:function(str){return str.toLowerCase()}};var mapper={rgx:function(){var result,i=0,j,k,p,q,matches,match,args=arguments;while(i0){if(q.length==2){if(typeof q[1]==FUNC_TYPE){result[q[0]]=q[1].call(this,match)}else{result[q[0]]=q[1]}}else if(q.length==3){if(typeof q[1]===FUNC_TYPE&&!(q[1].exec&&q[1].test)){result[q[0]]=match?q[1].call(this,match,q[2]):undefined}else{result[q[0]]=match?match.replace(q[1],q[2]):undefined}}else if(q.length==4){result[q[0]]=match?q[3].call(this,match.replace(q[1],q[2])):undefined}}else{result[q]=match?match:undefined}}}}i+=2}return result},str:function(str,map){for(var i in map){if(typeof map[i]===OBJ_TYPE&&map[i].length>0){for(var j=0;j0){if(q.length==2){if(typeof q[1]==FUNC_TYPE){result[q[0]]=q[1].call(this,match)}else{result[q[0]]=q[1]}}else if(q.length==3){if(typeof q[1]===FUNC_TYPE&&!(q[1].exec&&q[1].test)){result[q[0]]=match?q[1].call(this,match,q[2]):undefined}else{result[q[0]]=match?match.replace(q[1],q[2]):undefined}}else if(q.length==4){result[q[0]]=match?q[3].call(this,match.replace(q[1],q[2])):undefined}}else{result[q]=match?match:undefined}}break}}if(!!matches)break}return result},str:function(str,map){for(var i in map){if(typeof map[i]===OBJ_TYPE&&map[i].length>0){for(var j=0;j