├── 141125
├── index.html
└── js
│ ├── page
│ └── index.js
│ └── tool
│ ├── avalon.js
│ ├── domReady.js
│ └── require.js
├── 150111
├── css
│ ├── detail.css
│ └── user.css
├── detail.html
├── index.html
├── js
│ ├── lib
│ │ ├── avalon.js
│ │ ├── css.js
│ │ ├── domReady.js
│ │ ├── mmHistory.js
│ │ ├── mmRouter.js
│ │ └── require.js
│ └── page
│ │ └── user.js
├── mine.html
└── recharge.html
├── 150620
├── JSXTransformer.js
├── demo1.html
├── demo2.html
├── demo3.html
├── demo4.html
├── demo5.html
├── demo6.html
└── react.js
├── 150626
├── JSXTransformer.js
├── demo1.html
├── demo10.html
├── demo2.html
├── demo3.html
├── demo4.html
├── demo5.html
├── demo6.html
├── demo7.html
├── demo8.html
├── demo9.html
└── react.js
├── 150921
├── JSXTransformer.js
├── Refs.html
├── forceUpdate.html
├── getDOMNode.html
├── isMounted.html
├── react.js
├── replaceProps.html
├── replaceState.html
├── setProps.html
└── setState.html
├── 151031
├── karma.conf.js
├── package.json
├── src
│ └── Alert.js
├── test
│ └── Alert.js
└── webpack.config.js
├── 170201
├── async-done.js
├── bach
│ ├── parallel.js
│ └── series.js
├── demo1.js
├── demo2.js
├── last-run.js
├── now-and-later.map.js
├── now-and-later.mapSeries.js
├── undertaker-master
│ ├── index.js
│ └── lib
│ │ ├── get-task.js
│ │ ├── helpers
│ │ ├── buildTree.js
│ │ ├── createExtensions.js
│ │ ├── metadata.js
│ │ ├── normalizeArgs.js
│ │ └── validateRegistry.js
│ │ ├── last-run.js
│ │ ├── parallel.js
│ │ ├── registry.js
│ │ ├── series.js
│ │ ├── set-task.js
│ │ ├── task.js
│ │ └── tree.js
└── undertaker-registry.js
├── .gitattributes
├── .gitignore
└── FrozenUI-React
├── dist
└── js
│ └── page
│ ├── loading.js
│ └── tab.js
├── loading.html
├── package.json
├── src
├── css
│ ├── frozen.css
│ └── reset.scss
├── img
│ ├── loading_sprite.png
│ ├── loading_sprite_white.png
│ └── vip
│ │ ├── icon_qqlevel_sprite.png
│ │ └── icon_vip.png
└── js
│ ├── component
│ ├── Loading.js
│ ├── Tab.js
│ ├── TabPane.js
│ ├── globalEventHandler.js
│ └── styleMaps.js
│ └── page
│ ├── loading.js
│ └── tab.js
├── tab.html
└── webpack.config.js
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | node_modules
3 | */**/node_modules
--------------------------------------------------------------------------------
/141125/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 初玩阿瓦隆
6 |
7 |
8 |
9 |
16 |
26 |
27 |
--------------------------------------------------------------------------------
/141125/js/page/index.js:
--------------------------------------------------------------------------------
1 | require.config({
2 | baseUrl: 'js/', //相对于index.html页面文件的地址
3 | paths:{ //这里配置的地址,都是相对于上方的baseUrl的
4 | avalon: 'tool/avalon',
5 | domReady:'tool/domReady'
6 | },
7 | shim:{
8 | avalon: { exports: "avalon" }
9 | }
10 | });
11 |
12 | require(['avalon',"domReady!"], function() {
13 | var vm = avalon.define({
14 | $id: "list",
15 | more_name: "gg",
16 | more_text: "更多公告",
17 | gg:conf.gg,
18 | bd:conf.bd,
19 | infoList:conf.gg,
20 | changeUl:function(flag){
21 | if(flag){
22 | vm.more_name = "gg";
23 | vm.more_text = "更多公告";
24 | vm.infoList = vm.gg;
25 | }else{
26 | vm.more_name = "bd";
27 | vm.more_text = "更多报道";
28 | vm.infoList = vm.bd;
29 | }
30 | }
31 | });
32 | avalon.scan();
33 | });
34 |
35 |
--------------------------------------------------------------------------------
/141125/js/tool/domReady.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @license RequireJS domReady 2.0.1 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
3 | * Available via the MIT or new BSD license.
4 | * see: http://github.com/requirejs/domReady for details
5 | */
6 | /*jslint */
7 | /*global require: false, define: false, requirejs: false,
8 | window: false, clearInterval: false, document: false,
9 | self: false, setInterval: false */
10 |
11 |
12 | define(function () {
13 | 'use strict';
14 |
15 | var isTop, testDiv, scrollIntervalId,
16 | isBrowser = typeof window !== "undefined" && window.document,
17 | isPageLoaded = !isBrowser,
18 | doc = isBrowser ? document : null,
19 | readyCalls = [];
20 |
21 | function runCallbacks(callbacks) {
22 | var i;
23 | for (i = 0; i < callbacks.length; i += 1) {
24 | callbacks[i](doc);
25 | }
26 | }
27 |
28 | function callReady() {
29 | var callbacks = readyCalls;
30 |
31 | if (isPageLoaded) {
32 | //Call the DOM ready callbacks
33 | if (callbacks.length) {
34 | readyCalls = [];
35 | runCallbacks(callbacks);
36 | }
37 | }
38 | }
39 |
40 | /**
41 | * Sets the page as loaded.
42 | */
43 | function pageLoaded() {
44 | if (!isPageLoaded) {
45 | isPageLoaded = true;
46 | if (scrollIntervalId) {
47 | clearInterval(scrollIntervalId);
48 | }
49 |
50 | callReady();
51 | }
52 | }
53 |
54 | if (isBrowser) {
55 | if (document.addEventListener) {
56 | //Standards. Hooray! Assumption here that if standards based,
57 | //it knows about DOMContentLoaded.
58 | document.addEventListener("DOMContentLoaded", pageLoaded, false);
59 | window.addEventListener("load", pageLoaded, false);
60 | } else if (window.attachEvent) {
61 | window.attachEvent("onload", pageLoaded);
62 |
63 | testDiv = document.createElement('div');
64 | try {
65 | isTop = window.frameElement === null;
66 | } catch (e) {}
67 |
68 | //DOMContentLoaded approximation that uses a doScroll, as found by
69 | //Diego Perini: http://javascript.nwbox.com/IEContentLoaded/,
70 | //but modified by other contributors, including jdalton
71 | if (testDiv.doScroll && isTop && window.external) {
72 | scrollIntervalId = setInterval(function () {
73 | try {
74 | testDiv.doScroll();
75 | pageLoaded();
76 | } catch (e) {}
77 | }, 30);
78 | }
79 | }
80 |
81 | //Check if document already complete, and if so, just trigger page load
82 | //listeners. Latest webkit browsers also use "interactive", and
83 | //will fire the onDOMContentLoaded before "interactive" but not after
84 | //entering "interactive" or "complete". More details:
85 | //http://dev.w3.org/html5/spec/the-end.html#the-end
86 | //http://stackoverflow.com/questions/3665561/document-readystate-of-interactive-vs-ondomcontentloaded
87 | //Hmm, this is more complicated on further use, see "firing too early"
88 | //bug: https://github.com/requirejs/domReady/issues/1
89 | //so removing the || document.readyState === "interactive" test.
90 | //There is still a window.onload binding that should get fired if
91 | //DOMContentLoaded is missed.
92 | if (document.readyState === "complete") {
93 | pageLoaded();
94 | }
95 | }
96 |
97 | /** START OF PUBLIC API **/
98 |
99 | /**
100 | * Registers a callback for DOM ready. If DOM is already ready, the
101 | * callback is called immediately.
102 | * @param {Function} callback
103 | */
104 | function domReady(callback) {
105 | if (isPageLoaded) {
106 | callback(doc);
107 | } else {
108 | readyCalls.push(callback);
109 | }
110 | return domReady;
111 | }
112 |
113 | domReady.version = '2.0.1';
114 |
115 | /**
116 | * Loader Plugin API method
117 | */
118 | domReady.load = function (name, req, onLoad, config) {
119 | if (config.isBuild) {
120 | onLoad(null);
121 | } else {
122 | domReady(onLoad);
123 | }
124 | };
125 |
126 | /** END OF PUBLIC API **/
127 |
128 | return domReady;
129 | });
130 |
--------------------------------------------------------------------------------
/141125/js/tool/require.js:
--------------------------------------------------------------------------------
1 | /*
2 | RequireJS 2.1.14 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
3 | Available via the MIT or new BSD license.
4 | see: http://github.com/jrburke/requirejs for details
5 | */
6 | var requirejs,require,define;
7 | (function(ba){function G(b){return"[object Function]"===K.call(b)}function H(b){return"[object Array]"===K.call(b)}function v(b,c){if(b){var d;for(d=0;dthis.depCount&&!this.defined){if(G(l)){if(this.events.error&&this.map.isDefine||g.onError!==ca)try{f=i.execCb(c,l,b,f)}catch(d){a=d}else f=i.execCb(c,l,b,f);this.map.isDefine&&void 0===f&&((b=this.module)?f=b.exports:this.usingExports&&
19 | (f=this.exports));if(a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",w(this.error=a)}else f=l;this.exports=f;if(this.map.isDefine&&!this.ignore&&(r[c]=f,g.onResourceLoad))g.onResourceLoad(i,this.map,this.depMaps);y(c);this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a=
20 | this.map,b=a.id,d=p(a.prefix);this.depMaps.push(d);q(d,"defined",u(this,function(f){var l,d;d=m(aa,this.map.id);var e=this.map.name,P=this.map.parentMap?this.map.parentMap.name:null,n=i.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(f.normalize&&(e=f.normalize(e,function(a){return c(a,P,!0)})||""),f=p(a.prefix+"!"+e,this.map.parentMap),q(f,"defined",u(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),d=m(h,f.id)){this.depMaps.push(f);
21 | if(this.events.error)d.on("error",u(this,function(a){this.emit("error",a)}));d.enable()}}else d?(this.map.url=i.nameToUrl(d),this.load()):(l=u(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),l.error=u(this,function(a){this.inited=!0;this.error=a;a.requireModules=[b];B(h,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&y(a.map.id)});w(a)}),l.fromText=u(this,function(f,c){var d=a.name,e=p(d),P=M;c&&(f=c);P&&(M=!1);s(e);t(j.config,b)&&(j.config[d]=j.config[b]);try{g.exec(f)}catch(h){return w(C("fromtexteval",
22 | "fromText eval for "+b+" failed: "+h,h,[b]))}P&&(M=!0);this.depMaps.push(e);i.completeLoad(d);n([d],l)}),f.load(a.name,n,l,j))}));i.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){V[this.map.id]=this;this.enabling=this.enabled=!0;v(this.depMaps,u(this,function(a,b){var c,f;if("string"===typeof a){a=p(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=m(L,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;q(a,"defined",u(this,function(a){this.defineDep(b,
23 | a);this.check()}));this.errback&&q(a,"error",u(this,this.errback))}c=a.id;f=h[c];!t(L,c)&&(f&&!f.enabled)&&i.enable(a,this)}));B(this.pluginMaps,u(this,function(a){var b=m(h,a.id);b&&!b.enabled&&i.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){v(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};i={config:j,contextName:b,registry:h,defined:r,urlFetched:S,defQueue:A,Module:Z,makeModuleMap:p,
24 | nextTick:g.nextTick,onError:w,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=j.shim,c={paths:!0,bundles:!0,config:!0,map:!0};B(a,function(a,b){c[b]?(j[b]||(j[b]={}),U(j[b],a,!0,!0)):j[b]=a});a.bundles&&B(a.bundles,function(a,b){v(a,function(a){a!==b&&(aa[a]=b)})});a.shim&&(B(a.shim,function(a,c){H(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=i.makeShimExports(a);b[c]=a}),j.shim=b);a.packages&&v(a.packages,function(a){var b,
25 | a="string"===typeof a?{name:a}:a;b=a.name;a.location&&(j.paths[b]=a.location);j.pkgs[b]=a.name+"/"+(a.main||"main").replace(ia,"").replace(Q,"")});B(h,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=p(b))});if(a.deps||a.callback)i.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(ba,arguments));return b||a.exports&&da(a.exports)}},makeRequire:function(a,e){function j(c,d,m){var n,q;e.enableBuildCallback&&(d&&G(d))&&(d.__requireJsBuild=
26 | !0);if("string"===typeof c){if(G(d))return w(C("requireargs","Invalid require call"),m);if(a&&t(L,c))return L[c](h[a.id]);if(g.get)return g.get(i,c,a,j);n=p(c,a,!1,!0);n=n.id;return!t(r,n)?w(C("notloaded",'Module name "'+n+'" has not been loaded yet for context: '+b+(a?"":". Use require([])"))):r[n]}J();i.nextTick(function(){J();q=s(p(null,a));q.skipMap=e.skipMap;q.init(c,d,m,{enabled:!0});D()});return j}e=e||{};U(j,{isBrowser:z,toUrl:function(b){var d,e=b.lastIndexOf("."),k=b.split("/")[0];if(-1!==
27 | e&&(!("."===k||".."===k)||1e.attachEvent.toString().indexOf("[native code"))&&!Y?(M=!0,e.attachEvent("onreadystatechange",b.onScriptLoad)):
34 | (e.addEventListener("load",b.onScriptLoad,!1),e.addEventListener("error",b.onScriptError,!1)),e.src=d,J=e,D?y.insertBefore(e,D):y.appendChild(e),J=null,e;if(ea)try{importScripts(d),b.completeLoad(c)}catch(m){b.onError(C("importscripts","importScripts failed for "+c+" at "+d,m,[c]))}};z&&!q.skipDataMain&&T(document.getElementsByTagName("script"),function(b){y||(y=b.parentNode);if(I=b.getAttribute("data-main"))return s=I,q.baseUrl||(E=s.split("/"),s=E.pop(),O=E.length?E.join("/")+"/":"./",q.baseUrl=
35 | O),s=s.replace(Q,""),g.jsExtRegExp.test(s)&&(s=I),q.deps=q.deps?q.deps.concat(s):[s],!0});define=function(b,c,d){var e,g;"string"!==typeof b&&(d=c,c=b,b=null);H(c)||(d=c,c=null);!c&&G(d)&&(c=[],d.length&&(d.toString().replace(ka,"").replace(la,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c)));if(M){if(!(e=J))N&&"interactive"===N.readyState||T(document.getElementsByTagName("script"),function(b){if("interactive"===b.readyState)return N=b}),e=N;e&&(b||
36 | (b=e.getAttribute("data-requiremodule")),g=F[e.getAttribute("data-requirecontext")])}(g?g.defQueue:R).push([b,c,d])};define.amd={jQuery:!0};g.exec=function(b){return eval(b)};g(q)}})(this);
--------------------------------------------------------------------------------
/150111/css/detail.css:
--------------------------------------------------------------------------------
1 | .detail{color:red;}
--------------------------------------------------------------------------------
/150111/css/user.css:
--------------------------------------------------------------------------------
1 | body,html{padding: 0;margin:0;background: #EEE;}
2 | .ms-controller{visibility: hidden;}
3 | header{height: 50px;background: white;}
4 | header>span{display:block;padding: 16px;}
5 | nav{position: absolute;left:0;margin-top:50px;width: 200px;}
6 | nav>ul>li{margin-top: 12px;}
7 | nav>ul>li>a{text-decoration: none;color:blue;}
8 | nav>ul>li>a:hover{color:red;}
9 | article{padding: 15px;margin-left:200px;min-height: 600px;background: white;}
--------------------------------------------------------------------------------
/150111/detail.html:
--------------------------------------------------------------------------------
1 |
2 | 哟哟哟,这里是详情页面,{{username.name}}你好
3 |
4 |
--------------------------------------------------------------------------------
/150111/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 账户中心
6 |
7 |
8 |
9 |
10 |
16 |
17 | {{username.name}}你好,欢迎来到账户中心
18 |
19 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/150111/js/lib/css.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Require-CSS RequireJS css! loader plugin
3 | * 0.1.2
4 | * Guy Bedford 2013
5 | * MIT
6 | */
7 |
8 | /*
9 | *
10 | * Usage:
11 | * require(['css!./mycssFile']);
12 | *
13 | * Tested and working in (up to latest versions as of March 2013):
14 | * Android
15 | * iOS 6
16 | * IE 6 - 10
17 | * Chome 3 - 26
18 | * Firefox 3.5 - 19
19 | * Opera 10 - 12
20 | *
21 | * browserling.com used for virtual testing environment
22 | *
23 | * Credit to B Cavalier & J Hann for the IE 6 - 9 method,
24 | * refined with help from Martin Cermak
25 | *
26 | * Sources that helped along the way:
27 | * - https://developer.mozilla.org/en-US/docs/Browser_detection_using_the_user_agent
28 | * - http://www.phpied.com/when-is-a-stylesheet-really-loaded/
29 | * - https://github.com/cujojs/curl/blob/master/src/curl/plugin/css.js
30 | *
31 | */
32 |
33 | define(function() {
34 | //>>excludeStart('excludeRequireCss', pragmas.excludeRequireCss)
35 | if (typeof window == 'undefined')
36 | return { load: function(n, r, load){ load() } };
37 |
38 | var head = document.getElementsByTagName('head')[0];
39 |
40 | var engine = window.navigator.userAgent.match(/Trident\/([^ ;]*)|AppleWebKit\/([^ ;]*)|Opera\/([^ ;]*)|rv\:([^ ;]*)(.*?)Gecko\/([^ ;]*)|MSIE\s([^ ;]*)|AndroidWebKit\/([^ ;]*)/) || 0;
41 |
42 | // use
11 |
12 |
13 |
14 |
15 |
16 |
31 |
32 |