Skip to content

Commit

Permalink
docs: finalize public api docs for 1.0 release (#418)
Browse files Browse the repository at this point in the history
* docs: finalize public api docs for 1.0 release

* docs: finalize serializer public api docs

* fix: only include src dir in docs

* docs: finalize controller api doc properties

* docs: continued improvement of controller api docs

* docs: make code snippets consistent in overview

* docs: finalize controller api docs and start model api docs

* docs: update controller and serializer docs

* refactor: move doc builder to another repo

* docs: clean up comment formatting
  • Loading branch information
zacharygolba authored Oct 19, 2016
1 parent 7af75be commit 6656b9a
Show file tree
Hide file tree
Showing 16 changed files with 1,205 additions and 418 deletions.
3 changes: 0 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ dist/
# tests
test/

# docs
docs/

# dependencies
node_modules/

Expand Down
1 change: 0 additions & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ decl
[ignore]
.*/lib/.*
.*/dist/.*
.*/docs/.*
.*/scripts/.*
.*/examples/.*
.*/node_modules/bcryptjs/*
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*.lcov
coverage/
dist/
docs/
.nyc_output/

# dependencies
Expand Down
3 changes: 0 additions & 3 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ node_modules/
coverage/
examples/

# docs
docs/

# logs
log/
npm-debug.log
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
"scripts": {
"build": "npm run clean && npm run flow && npm run lint && npm run build:cli",
"build:cli": "node scripts/build/cli.js",
"build:docs": "documentation build src -o docs -f html",
"build:test": "node scripts/build/test.js",
"clean": "node scripts/clean.js",
"docs": "npm run clean && npm run build:docs",
"flow": "flow check",
"lint": "eslint .",
"start": "lux serve",
Expand Down Expand Up @@ -58,7 +56,6 @@
"babel-preset-lux": "1.3.0",
"chai": "3.5.0",
"codecov": "1.0.1",
"documentation": "4.0.0-beta9",
"eslint-config-airbnb-base": "9.0.0",
"eslint-plugin-flowtype": "2.20.0",
"eslint-plugin-import": "2.0.1",
Expand Down
1 change: 0 additions & 1 deletion scripts/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Promise.all([
rmrf(path.join(__dirname, '..', 'coverage')),
rmrf(path.join(__dirname, '..', 'coverage.lcov')),
rmrf(path.join(__dirname, '..', 'dist')),
rmrf(path.join(__dirname, '..', 'docs')),
rmrf(path.join(__dirname, '..', 'test', 'test-app', 'dist'))
]).then(() => {
process.exit(0);
Expand Down
1 change: 0 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ export { default as Logger } from './packages/logger';
export { default as Controller } from './packages/controller';
export { default as Serializer } from './packages/serializer';
export { default as Application } from './packages/application';

export { default as luxify } from './packages/luxify';
104 changes: 48 additions & 56 deletions src/packages/application/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,110 +14,102 @@ import type { Application$opts } from './interfaces';

/**
* The `Application` class is responsible for constructing an application and
* putting all the moving parts (`Model`, `Controller`, `Serializer`) together.
* putting all the moving parts together.
*
* @module lux-framework
* @namespace Lux
* @class Application
* @constructor
* @public
*/
class Application {
/**
* An absolute path to the root directory of the `Application` instance.
*
* @example
* '/projects/my-app'
* The path of `Application` instance.
*
* @property path
* @memberof Application
* @instance
* @readonly
* @type {String}
* @public
*/
path: string;

/**
* The port that the `Application` instance will listen for connections.
* The port that an `Application` instance is listening for incomming HTTP
* requests.
*
* @property port
* @memberof Application
* @instance
* @readonly
* @type {Number}
* @public
*/
port: number;

/**
* A reference to the instance of `Database`.
* A reference to the `Database` instance.
*
* @property store
* @memberof Application
* @instance
* @readonly
* @type {Database}
* @private
*/
store: Database;

/**
* A map containing each `Model` class in an application instance.
* A reference to the `Logger` instance.
*
* @property models
* @memberof Application
* @instance
* @readonly
* @property logger
* @type {Logger}
* @private
*/
models: FreezeableMap<string, Class<Model>>;
logger: Logger;

/**
* A reference to the instance of `Logger`.
* A reference to the `Router` instance.
*
* @property logger
* @memberof Application
* @instance
* @readonly
* @property router
* @type {Router}
* @private
*/
logger: Logger;
router: Router;

/**
* A map containing each `Controller` class in an application instance.
* A reference to the `Server` instance.
*
* @property controllers
* @memberof Application
* @instance
* @readonly
* @property server
* @type {Server}
* @private
*/
controllers: FreezeableMap<string, Controller>;
server: Server;

/**
* A map containing each `Serializer` class in an application instance.
* A map containing each `Model` class.
*
* @property serializers
* @memberof Application
* @instance
* @readonly
* @property models
* @type {Map}
* @private
*/
serializers: FreezeableMap<string, Serializer<*>>;
models: FreezeableMap<string, Class<Model>>;

/**
* A reference to the instance of `Router`.
* A map containing each `Controller` instance.
*
* @property logger
* @memberof Application
* @instance
* @readonly
* @property controllers
* @type {Map}
* @private
*/
router: Router;
controllers: FreezeableMap<string, Controller>;

/**
* A reference to the instance of `Server`.
* A map containing each `Serializer` instance.
*
* @property server
* @memberof Application
* @instance
* @readonly
* @property serializers
* @type {Map}
* @private
*/
server: Server;
serializers: FreezeableMap<string, Serializer<*>>;

/**
* Create an instance of `Application`.
*
* WARNING:
* It is highly reccomended that you do not override this method.
* @method constructor
* @param {Object} config
* @return {Promise}
* @public
*/
constructor(opts: Application$opts): Promise<Application> {
return initialize(this, merge(createDefaultConfig(), opts));
Expand Down
Loading

0 comments on commit 6656b9a

Please sign in to comment.