-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from Vrolijkx/feature/11_performance
Feature/11 performance fixes #11
- Loading branch information
Showing
19 changed files
with
598 additions
and
290 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* Indicates that the component can be configured. | ||
*/ | ||
var Configurable = { | ||
/** | ||
* This options will be presented to the user | ||
* in the help description | ||
* | ||
* @return the possible configuration options | ||
*/ | ||
getConfigurationOptions: function () { | ||
}, | ||
|
||
/** | ||
* Called when configuration might have been changed | ||
* | ||
* @param the configuration to use from now on | ||
*/ | ||
updateConfiguration: function (configuration) { | ||
} | ||
}; | ||
|
||
module.exports = Configurable; |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
var FileManager = { | ||
|
||
scanAndWatchFiles: function (dir, category) { | ||
}, | ||
getFilePaths: function (categoryName) { | ||
}, | ||
hasChangedFileForCategory: function (categoryName) { | ||
} | ||
|
||
}; | ||
|
||
module.exports = FileManager; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* Represents a directory from which assets, translations, ... | ||
* will be served | ||
*/ | ||
var Project = { | ||
/** | ||
* @param uri | ||
* @return the full path matching the given uri | ||
*/ | ||
getAsset: function (uri) { | ||
}, | ||
|
||
/** | ||
* Merges in the translations found in getProjectDir | ||
* | ||
* @param translations the translations JSON object to be updated | ||
*/ | ||
updateTranslations: function (translations) { | ||
}, | ||
|
||
updateUiFiles: function (category, uifiles) { | ||
}, | ||
|
||
/** | ||
* @return the working directory of this project | ||
*/ | ||
getProjectDir: function () { | ||
}, | ||
hasChangedFileForCategory: function (categoryName) { | ||
} | ||
}; | ||
|
||
module.exports = Project; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* The router will use requestHandlers to serve requests. | ||
* The request handler with the lowest priority number | ||
* that canHandle the request will be asked to handle | ||
* the request first. If successful other following | ||
* requestHandlers are ignored | ||
*/ | ||
var RequestHandler = { | ||
/** | ||
* Lower priority number gets precedence | ||
*/ | ||
getPriority: function () { | ||
}, | ||
/** | ||
* Indicates whether this requestHandler | ||
* can handle this request | ||
* | ||
* @param req The request to handle | ||
*/ | ||
canHandle: function (req) { | ||
}, | ||
/** | ||
* Try to serve the request | ||
* | ||
* @param req The request to handle | ||
* @param res The response to send | ||
* | ||
* @return true if request was served successfully, | ||
* false otherwise | ||
*/ | ||
handle: function (req, res) { | ||
}, | ||
/** | ||
* Unique identifier for the requestHandler | ||
*/ | ||
getName: function () { | ||
} | ||
}; | ||
|
||
module.exports = RequestHandler; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
var ResponseHandler = { | ||
|
||
canProcess: function (req) { | ||
}, | ||
preProcess: function (res, req) { | ||
}, | ||
|
||
/** | ||
* Lower priority number gets precedence | ||
*/ | ||
getPriority: function () { | ||
}, | ||
/** | ||
* Unique identifier for the requestHandler | ||
*/ | ||
getName: function () { | ||
} | ||
}; | ||
|
||
module.exports = ResponseHandler; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** | ||
* Indicates that the component can route requests | ||
*/ | ||
var Routable = { | ||
/** | ||
* Called by the http-server when a request arrives | ||
* @param request | ||
* @param response | ||
*/ | ||
onRequest: function (request, response) { | ||
} | ||
}; | ||
|
||
module.exports = Routable; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use strict'; | ||
|
||
var _ = require('lodash'); | ||
|
||
function Mode(value, active) { | ||
this.isActive = function (fallback) { | ||
return _.isUndefined(active) ? fallback.call() : active; | ||
}; | ||
|
||
this.getValue = function () { | ||
return value; | ||
} | ||
} | ||
|
||
|
||
module.exports = { | ||
on: new Mode('on', true), | ||
off: new Mode('off', false), | ||
auto: new Mode('auto') | ||
}; |
Oops, something went wrong.