Skip to content

Commit

Permalink
hack for server/client
Browse files Browse the repository at this point in the history
  • Loading branch information
Raynos committed Apr 11, 2012
1 parent 7909752 commit 68a92ed
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions bin/ncore
Expand Up @@ -40,6 +40,9 @@ function readFiles(err, files) {
if (err) {
throw err
}
files.files = files.files.filter(function (uri) {
return uri.indexOf("/server/") === -1
})
after.forEach(files.files, tunnelWriteDependencies, done)
}

Expand Down
8 changes: 8 additions & 0 deletions modules/moduleLoader.js
Expand Up @@ -26,6 +26,11 @@ pd.extend(ModuleLoader, {
this.core.use(relative, module);
this.callback();
} else if (stats.isDirectory()) {
if (this.skip) {
if (this.uri.indexOf(skip) !== -1) {
return this.callback()
}
}
fs.readdir(this.uri, this.readFiles);
}
},
Expand Down Expand Up @@ -61,6 +66,7 @@ module.exports = {
files in the folder (uri). This is based on
files/folderNames
uri: {String} - uri of the folder to load
skip: {String} - string to match the folder name again to skip
callback: {Function} - callback to invoke when all modules
are loaded and attached to core. Passes an error if
the error occurs
Expand All @@ -75,6 +81,7 @@ module.exports = {

ModuleLoader({
uri: options.uri,
skip: options.skip,
core: options.core,
callback: next
})
Expand Down Expand Up @@ -109,6 +116,7 @@ module.exports = {
moduleLoader.load({
uri: uri,
core: Core,
skip: "client/"
dependencies: require(path.join(uri, "dependency.json")),
callback: init
})
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "ncore",
"version": "1.3.4",
"version": "1.3.5",
"description": "Core library for your application",
"keywords": ["core", "architecture", "infrastructure"],
"author": "Raynos <raynos2@gmail.com>",
Expand Down

0 comments on commit 68a92ed

Please sign in to comment.