Comparing version 1.0.0 to 1.0.1
/*! | ||
* @ProjectName micro-app | ||
* @Version 0.1.0 | ||
* @Version 1.0.1 | ||
* @Author lixinliang(https://github.com/lixinliang) | ||
* @Update 2016-11-23 10:14:37 am | ||
* @Update 2016-11-23 11:27:48 am | ||
*/ | ||
@@ -414,3 +414,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
// Version | ||
defineProperty(microApp, 'version', '0.1.0'); | ||
defineProperty(microApp, 'version', '1.0.1'); | ||
@@ -417,0 +417,0 @@ // Define a filter by `microApp.filter` |
/*! | ||
* @ProjectName micro-app | ||
* @Version 0.1.0 | ||
* @Version 1.0.1 | ||
* @Author lixinliang(https://github.com/lixinliang) | ||
* @Update 2016-11-23 10:14:54 am | ||
* @Update 2016-11-23 11:28:05 am | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.microApp=e():t.microApp=e()}(this,function(){return function(t){function e(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return t[n].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e){"use strict";function i(t,e){if("string"!=typeof t||"function"!=typeof e)throw new TypeError("[micro-app] microApp.filter( name : String, method : Function );");var n=t.match(/\|/);if(n)throw new TypeError('[micro-app] "'+n[0]+'" is not allowed.');return i[t]=e,this}function n(t,e){var i=void 0,r=void 0;"string"==typeof t?i=r=t:(i=t[0],r=t[1]);var o=w.getAttribute(r);null!==o&&e(r,o,null);var c={get:function(){return o},set:function(t){return t!==o&&e(r,t,o),o=t},enumerable:!1};a(w,i,c),n[i]=!0,i!=r&&(a(w,r,c),n[r]=!0)}var r=document,o=r.head,a=Object.defineProperty.bind(Object),c=navigator.userAgent,p=/\(i[^;]+;( U;)? CPU.+Mac OS X/i.test(c),u=!/iPad/i.test(c),l=/\bversion\/([0-9.]+(?: beta)?)(?: mobile(?:\/[a-z0-9]+)?)? safari\//i.test(c),s=parseInt((c.match(/\bcpu(?: iphone)? os /i.test(c)?/\bcpu(?: iphone)? os ([0-9._]+)/i:/\biph os ([0-9_]+)/i)||[,0])[1]),f=function(t){return o.appendChild(t),t},h=function(t){o.removeChild(t)},v=[[["72x72","144x144"],["76x76","152x152"]],[["57x57","114x114"],["60x60","120x120"]]],d={},m="device-width",b="device-height";u?(d[m]=320,d[b]=480,[{width:320,height:568},{width:375,height:667},{width:414,height:736}].forEach(function(t){matchMedia("("+m+":"+t.width+"px)and("+b+":"+t.height+"px)").matches&&(d[m]=t.width,d[b]=t.height)}),d[m]+="px",d[b]+="px"):(d[m]="768px",d[b]="1024px"),d["-webkit-device-pixel-ratio"]=devicePixelRatio;var x=function(t){if("icon"==t){var e=v[+u][+(s>6)][+(devicePixelRatio>1)];return{sizes:e}}if("splash"==t){var i=[];for(var n in d)i.push("("+n+":"+d[n]+")");if(!u||3==devicePixelRatio){var r="(orientation:landscape)";matchMedia(r).matches?i.push(r):i.push("(orientation:portrait)")}var o=i.join("and");return{media:o}}},g=r.createElement("div"),y=function(t){return g.innerHTML=t,g.firstElementChild},w=r.querySelector("script[micro-app]")||f(y("<script micro-app>")),A=function(t,e,i){return a(t,e,{value:i,writable:!1,enumerable:!1,configurable:!1})},P=function(t,e){var i=w[t];A(w,t,A(A(function(){var t=!0,n=e.call(this,{stopPropagation:function(){t=!1}},arguments);return t?i.apply(this,arguments):n},"name",t),"toString",function(){return"function "+t+"() { [native code] }"}))},E=Element.prototype,j=E.setAttribute,S=E.removeAttribute,O=function(t,e,i){null===i?S.call(t,e):j.call(t,e,i)},C={}.toString.call([]),M="[object Base64]",R=function(t,e){var n=[];return function(r,o,a){var c=o instanceof Array?o.slice(0):null===o?[]:[o];n.forEach(function(t){h(t)}),n=[];for(var p=c.length,u=0;u<p;u++){var l=c[u];null!==l&&!function(){var r=y(t);if(l instanceof Object){O(r,e,void 0);for(var o in l)O(r,o,l[o])}else O(r,e,l);var a=r.getAttribute(e);a.indexOf("#")>-1&&!function(){var t=a.split("#");O(r,e,t[0]),O(r,"filter",t[1]);var n=!1;t[1].split("|").forEach(function(t){if(!n){var e=i[t];e&&(n=e.call(r)===!1)}})}(),n.push(f(r))}()}O(w,r,o instanceof Array?C:/^data:image/.test(o)?M:o)}};A(w,"version","0.1.0"),A(w,"filter",i),p&&l&&!function(){w.filter("precomposed",function(){this.rel="apple-touch-icon-precomposed"}).filter("autosize",function(){var t="apple-touch-startup-image"==this.getAttribute("rel")?"splash":"icon",e=x(t);if(e)for(var i in e)this.setAttribute(i,e[i])});var t=y('<meta name="apple-mobile-web-app-capable" content="yes">');n("capable",function(e,i,n){O(w,e,i),null===i&&h(t),null===n&&f(t)});var e=y('<meta name="apple-mobile-web-app-status-bar-style">');n(["statusBarStyle","status-bar-style"],function(t,i,n){O(w,t,i),O(e,"content",i),null===i&&h(e),null===n&&f(e)});var i=y('<meta name="apple-mobile-web-app-title">');n("title",function(t,e,n){O(w,t,e),O(i,"content",e),null===e&&h(i),null===n&&f(i)}),n("icon",R('<link rel="apple-touch-icon">',"href")),n("splash",R('<link rel="apple-touch-startup-image">',"href")),P("getAttribute",function(t,e){var i=e[0];if(w===this&&i in n)return t.stopPropagation(),w[i]}),P("setAttribute",function(t,e){var i=e[0],r=e[1];if(w===this&&i in n)return t.stopPropagation(),w[i]=r}),P("removeAttribute",function(t,e){var i=e[0];if(w===this&&i in n)return t.stopPropagation(),w[i]=null})}(),t.exports=window.microApp=w}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.microApp=e():t.microApp=e()}(this,function(){return function(t){function e(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return t[n].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e){"use strict";function i(t,e){if("string"!=typeof t||"function"!=typeof e)throw new TypeError("[micro-app] microApp.filter( name : String, method : Function );");var n=t.match(/\|/);if(n)throw new TypeError('[micro-app] "'+n[0]+'" is not allowed.');return i[t]=e,this}function n(t,e){var i=void 0,r=void 0;"string"==typeof t?i=r=t:(i=t[0],r=t[1]);var o=w.getAttribute(r);null!==o&&e(r,o,null);var c={get:function(){return o},set:function(t){return t!==o&&e(r,t,o),o=t},enumerable:!1};a(w,i,c),n[i]=!0,i!=r&&(a(w,r,c),n[r]=!0)}var r=document,o=r.head,a=Object.defineProperty.bind(Object),c=navigator.userAgent,p=/\(i[^;]+;( U;)? CPU.+Mac OS X/i.test(c),u=!/iPad/i.test(c),l=/\bversion\/([0-9.]+(?: beta)?)(?: mobile(?:\/[a-z0-9]+)?)? safari\//i.test(c),s=parseInt((c.match(/\bcpu(?: iphone)? os /i.test(c)?/\bcpu(?: iphone)? os ([0-9._]+)/i:/\biph os ([0-9_]+)/i)||[,0])[1]),f=function(t){return o.appendChild(t),t},h=function(t){o.removeChild(t)},v=[[["72x72","144x144"],["76x76","152x152"]],[["57x57","114x114"],["60x60","120x120"]]],d={},m="device-width",b="device-height";u?(d[m]=320,d[b]=480,[{width:320,height:568},{width:375,height:667},{width:414,height:736}].forEach(function(t){matchMedia("("+m+":"+t.width+"px)and("+b+":"+t.height+"px)").matches&&(d[m]=t.width,d[b]=t.height)}),d[m]+="px",d[b]+="px"):(d[m]="768px",d[b]="1024px"),d["-webkit-device-pixel-ratio"]=devicePixelRatio;var x=function(t){if("icon"==t){var e=v[+u][+(s>6)][+(devicePixelRatio>1)];return{sizes:e}}if("splash"==t){var i=[];for(var n in d)i.push("("+n+":"+d[n]+")");if(!u||3==devicePixelRatio){var r="(orientation:landscape)";matchMedia(r).matches?i.push(r):i.push("(orientation:portrait)")}var o=i.join("and");return{media:o}}},g=r.createElement("div"),y=function(t){return g.innerHTML=t,g.firstElementChild},w=r.querySelector("script[micro-app]")||f(y("<script micro-app>")),A=function(t,e,i){return a(t,e,{value:i,writable:!1,enumerable:!1,configurable:!1})},P=function(t,e){var i=w[t];A(w,t,A(A(function(){var t=!0,n=e.call(this,{stopPropagation:function(){t=!1}},arguments);return t?i.apply(this,arguments):n},"name",t),"toString",function(){return"function "+t+"() { [native code] }"}))},E=Element.prototype,j=E.setAttribute,S=E.removeAttribute,O=function(t,e,i){null===i?S.call(t,e):j.call(t,e,i)},C={}.toString.call([]),M="[object Base64]",R=function(t,e){var n=[];return function(r,o,a){var c=o instanceof Array?o.slice(0):null===o?[]:[o];n.forEach(function(t){h(t)}),n=[];for(var p=c.length,u=0;u<p;u++){var l=c[u];null!==l&&!function(){var r=y(t);if(l instanceof Object){O(r,e,void 0);for(var o in l)O(r,o,l[o])}else O(r,e,l);var a=r.getAttribute(e);a.indexOf("#")>-1&&!function(){var t=a.split("#");O(r,e,t[0]),O(r,"filter",t[1]);var n=!1;t[1].split("|").forEach(function(t){if(!n){var e=i[t];e&&(n=e.call(r)===!1)}})}(),n.push(f(r))}()}O(w,r,o instanceof Array?C:/^data:image/.test(o)?M:o)}};A(w,"version","1.0.1"),A(w,"filter",i),p&&l&&!function(){w.filter("precomposed",function(){this.rel="apple-touch-icon-precomposed"}).filter("autosize",function(){var t="apple-touch-startup-image"==this.getAttribute("rel")?"splash":"icon",e=x(t);if(e)for(var i in e)this.setAttribute(i,e[i])});var t=y('<meta name="apple-mobile-web-app-capable" content="yes">');n("capable",function(e,i,n){O(w,e,i),null===i&&h(t),null===n&&f(t)});var e=y('<meta name="apple-mobile-web-app-status-bar-style">');n(["statusBarStyle","status-bar-style"],function(t,i,n){O(w,t,i),O(e,"content",i),null===i&&h(e),null===n&&f(e)});var i=y('<meta name="apple-mobile-web-app-title">');n("title",function(t,e,n){O(w,t,e),O(i,"content",e),null===e&&h(i),null===n&&f(i)}),n("icon",R('<link rel="apple-touch-icon">',"href")),n("splash",R('<link rel="apple-touch-startup-image">',"href")),P("getAttribute",function(t,e){var i=e[0];if(w===this&&i in n)return t.stopPropagation(),w[i]}),P("setAttribute",function(t,e){var i=e[0],r=e[1];if(w===this&&i in n)return t.stopPropagation(),w[i]=r}),P("removeAttribute",function(t,e){var i=e[0];if(w===this&&i in n)return t.stopPropagation(),w[i]=null})}(),t.exports=window.microApp=w}])}); |
{ | ||
"name": "micro-app", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "(<5kb) [📱iOS] Create Progressive Web App Dynamically.", | ||
@@ -10,3 +10,5 @@ "main": "dist/micro-app.min.js", | ||
"build": "node ./webpack/webpack.node.js -build", | ||
"test": "jshint ./dist/micro-app.min.js" | ||
"test": "jshint ./dist/micro-app.min.js", | ||
"publish-please": "publish-please", | ||
"prepublish": "publish-please guard" | ||
}, | ||
@@ -53,2 +55,3 @@ "repository": { | ||
"node-sass": "^3.7.0", | ||
"publish-please": "^2.2.0", | ||
"rollup": "^0.36.3", | ||
@@ -55,0 +58,0 @@ "sass-loader": "^3.2.0", |
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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
992007
82
2
35