This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 重置样式 [[*/ | |
body,p,ul,ol,li,dl,dt,dd,h1,h2,h3,h4,h5,form,fieldset,legend,input,select,textarea,button,th,td,menu,article{margin:0;padding:0;} | |
article,aside,dialog,figure,footer,header,hgroup,nav,section,select{display:block;} | |
h1,h2,h3,h4,h5,h6,input,textarea,select,button,label{font-size:100%;font-weight:100;vertical-align:middle;} | |
ul,dl,ol{list-style:none;} | |
img,fieldset,input[type="submit"]{border:none;} | |
input{outline:none;background:transparent;vertical-align:top;} | |
table{border-collapse:collapse;border-spacing:0;} | |
button{cursor:pointer;border:none;} | |
textarea{word-wrap:break-word;resize:none;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function (receiver, supplier) { | |
Object.keys(supplier).forEach(function (property) { | |
Object.defineProperty(receiver, property, Object.getOwnPropertyDescriptor(supplier, property)); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parseDependencies(code) { | |
var REQUIRE_RE = /"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|\/\*[\S\s]*?\*\/|\/(?:\\\/|[^\/\r\n])+\/(?=[^\/])|\/\/.*|\.\s*require|(?:^|[^$])\brequire\s*\(\s*(["'])(.+?)\1\s*\)/g; | |
var SLASH_RE = /\\\\/g; | |
var ret = [] | |
code.replace(SLASH_RE, "") | |
.replace(REQUIRE_RE, function(m, m1, m2) { | |
if (m2) { | |
ret.push(m2) | |
} |