Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yiminghe committed Nov 5, 2013
1 parent d2cd20d commit c50de9e
Show file tree
Hide file tree
Showing 23 changed files with 1,582 additions and 1,525 deletions.
68 changes: 34 additions & 34 deletions build/kissy-nodejs-min.js

Large diffs are not rendered by default.

36 changes: 22 additions & 14 deletions build/kissy-nodejs.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright 2013, KISSY v1.40
MIT Licensed
build time: Oct 31 11:19
build time: Nov 5 15:06
*/
/**
* @ignore
Expand Down Expand Up @@ -42,11 +42,11 @@ var KISSY = (function (undefined) {
S = {
/**
* The build time of the library.
* NOTICE: '20131031111934' will replace with current timestamp when compressing.
* NOTICE: '20131105150616' will replace with current timestamp when compressing.
* @private
* @type {String}
*/
__BUILD_TIME: '20131031111934',
__BUILD_TIME: '20131105150616',

/**
* KISSY Environment.
Expand Down Expand Up @@ -4476,6 +4476,10 @@ var KISSY = (function (undefined) {
simulatedLocation = new S.Uri(locationHref)
}

S.Config.loadModsFn = function (rs, config) {
S.getScript(rs.fullpath, config);
};

configFns.map = function (rules) {
var Config = this.Config;
if (rules === false) {
Expand Down Expand Up @@ -4576,7 +4580,8 @@ var KISSY = (function (undefined) {
* @author yiminghe@gmail.com
*/
(function (S, undefined) {
var ie = S.UA.ie;
// ie11 is a new one!
var oldIE = S.UA.ie && S.UA.ie < 10;

function loadScripts(runtime, rss, callback, charset, timeout) {
var count = rss && rss.length,
Expand Down Expand Up @@ -4614,15 +4619,15 @@ var KISSY = (function (undefined) {
if (mod.getType() == 'css') {
mod = undefined;
}
else if (ie) {
else if (oldIE) {
startLoadModName = mod.name;
startLoadModTime = S.now();
config.attrs = {
'data-mod-name': mod.name
};
}
}
S.getScript(rs.fullpath, config);
S.Config.loadModsFn(rs, config);
});
}

Expand Down Expand Up @@ -4660,10 +4665,10 @@ var KISSY = (function (undefined) {
if (typeof name === 'function') {
config = fn;
fn = name;
if (ie) {
if (oldIE) {
// http://groups.google.com/group/commonjs/browse_thread/thread/5a3358ece35e688e/43145ceccfb1dc02#43145ceccfb1dc02
name = findModuleNameByInteractive();
// S.log('ie get modName by interactive: ' + name);
// S.log('oldIE get modName by interactive: ' + name);
Utils.registerModule(runtime, name, fn, config);
startLoadModName = null;
startLoadModTime = 0;
Expand All @@ -4675,7 +4680,7 @@ var KISSY = (function (undefined) {
};
}
} else {
if (ie) {
if (oldIE) {
startLoadModName = null;
startLoadModTime = 0;
} else {
Expand All @@ -4685,7 +4690,7 @@ var KISSY = (function (undefined) {
}
};

// ie 特有,找到当前正在交互的脚本,根据脚本名确定模块名
// oldIE 特有,找到当前正在交互的脚本,根据脚本名确定模块名
// 如果找不到,返回发送前那个脚本
function findModuleNameByInteractive() {
var scripts = S.Env.host.document.getElementsByTagName('script'),
Expand Down Expand Up @@ -4743,7 +4748,7 @@ var KISSY = (function (undefined) {
}


// Returns hash code of a stringdjb2 algorithm
// Returns hash code of a stringdjb2 algorithm
function getHash(str) {
var hash = 5381,
i;
Expand Down Expand Up @@ -4791,7 +4796,7 @@ var KISSY = (function (undefined) {
var msg = mod.name +
' is not loaded! can not find module in path : ' +
one.fullpath;
S.log(msg,'error');
S.log(msg, 'error');
mod.status = ERROR;
// notify all loader instance
mod.notifyAll();
Expand All @@ -4815,7 +4820,7 @@ var KISSY = (function (undefined) {
var msg = mod.name +
' is not loaded! can not find module in path : ' +
one.fullpath;
S.log(msg,'error');
S.log(msg, 'error');
mod.status = ERROR;
}
// notify all loader instance
Expand Down Expand Up @@ -5317,7 +5322,7 @@ var KISSY = (function (undefined) {
S.config({
charset: 'utf-8',
lang: 'zh-cn',
tag: '20131031111934'
tag: '20131105150616'
});

if (S.UA.nodejs) {
Expand Down Expand Up @@ -5483,6 +5488,9 @@ KISSY.add('i18n', {
});

function fireReady() {
if (domReady) {
return;
}
// nodejs
if (doc && !UA.nodejs) {
removeEventListener(win, LOAD_EVENT, fireReady);
Expand Down

0 comments on commit c50de9e

Please sign in to comment.