mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
refactor(appcache) addFiles: exports.watch -> watch
This commit is contained in:
parent
bb84fd6155
commit
8472ec1669
1 changed files with 6 additions and 4 deletions
|
|
@ -40,7 +40,9 @@
|
|||
* exports.addFiles([{'http://cdn.jquery/jq.js':'jquery.js'}, 'client.js']);
|
||||
*/
|
||||
exports.addFiles = function(pFileNames) {
|
||||
var i, n, lName, lCurrentName;
|
||||
var i, n, lName, lCurrentName,
|
||||
watch = exports.watch;
|
||||
|
||||
/* if a couple files */
|
||||
if (Util.isArray(pFileNames)) {
|
||||
n = pFilesNames.length;
|
||||
|
|
@ -52,13 +54,13 @@
|
|||
if (Util.isObject(lCurrentName))
|
||||
for(lName in lCurrentName) {
|
||||
FallBack_s += lName + ' ' + lCurrentName[lName] + '\n';
|
||||
exports.watch(lCurrentName[lName]);
|
||||
watch(lCurrentName[lName]);
|
||||
}
|
||||
else
|
||||
exports.watch(pFileNames[i]);
|
||||
watch(pFileNames[i]);
|
||||
}
|
||||
} else
|
||||
exports.watch(pFileNames);
|
||||
watch(pFileNames);
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue