Skip to content

Commit 6656b9a

Browse files
authored
docs: finalize public api docs for 1.0 release (#418)
* 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
1 parent 7af75be commit 6656b9a

File tree

16 files changed

+1205
-418
lines changed

16 files changed

+1205
-418
lines changed

.eslintignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ dist/
66
# tests
77
test/
88

9-
# docs
10-
docs/
11-
129
# dependencies
1310
node_modules/
1411

.flowconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ decl
44
[ignore]
55
.*/lib/.*
66
.*/dist/.*
7-
.*/docs/.*
87
.*/scripts/.*
98
.*/examples/.*
109
.*/node_modules/bcryptjs/*

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*.lcov
55
coverage/
66
dist/
7-
docs/
87
.nyc_output/
98

109
# dependencies

.npmignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ node_modules/
99
coverage/
1010
examples/
1111

12-
# docs
13-
docs/
14-
1512
# logs
1613
log/
1714
npm-debug.log

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@
1919
"scripts": {
2020
"build": "npm run clean && npm run flow && npm run lint && npm run build:cli",
2121
"build:cli": "node scripts/build/cli.js",
22-
"build:docs": "documentation build src -o docs -f html",
2322
"build:test": "node scripts/build/test.js",
2423
"clean": "node scripts/clean.js",
25-
"docs": "npm run clean && npm run build:docs",
2624
"flow": "flow check",
2725
"lint": "eslint .",
2826
"start": "lux serve",
@@ -58,7 +56,6 @@
5856
"babel-preset-lux": "1.3.0",
5957
"chai": "3.5.0",
6058
"codecov": "1.0.1",
61-
"documentation": "4.0.0-beta9",
6259
"eslint-config-airbnb-base": "9.0.0",
6360
"eslint-plugin-flowtype": "2.20.0",
6461
"eslint-plugin-import": "2.0.1",

scripts/clean.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Promise.all([
1111
rmrf(path.join(__dirname, '..', 'coverage')),
1212
rmrf(path.join(__dirname, '..', 'coverage.lcov')),
1313
rmrf(path.join(__dirname, '..', 'dist')),
14-
rmrf(path.join(__dirname, '..', 'docs')),
1514
rmrf(path.join(__dirname, '..', 'test', 'test-app', 'dist'))
1615
]).then(() => {
1716
process.exit(0);

src/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ export { default as Logger } from './packages/logger';
44
export { default as Controller } from './packages/controller';
55
export { default as Serializer } from './packages/serializer';
66
export { default as Application } from './packages/application';
7-
87
export { default as luxify } from './packages/luxify';

src/packages/application/index.js

Lines changed: 48 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -14,110 +14,102 @@ import type { Application$opts } from './interfaces';
1414

1515
/**
1616
* The `Application` class is responsible for constructing an application and
17-
* putting all the moving parts (`Model`, `Controller`, `Serializer`) together.
17+
* putting all the moving parts together.
18+
*
19+
* @module lux-framework
20+
* @namespace Lux
21+
* @class Application
22+
* @constructor
23+
* @public
1824
*/
1925
class Application {
2026
/**
21-
* An absolute path to the root directory of the `Application` instance.
22-
*
23-
* @example
24-
* '/projects/my-app'
27+
* The path of `Application` instance.
2528
*
2629
* @property path
27-
* @memberof Application
28-
* @instance
29-
* @readonly
30+
* @type {String}
31+
* @public
3032
*/
3133
path: string;
3234

3335
/**
34-
* The port that the `Application` instance will listen for connections.
36+
* The port that an `Application` instance is listening for incomming HTTP
37+
* requests.
3538
*
3639
* @property port
37-
* @memberof Application
38-
* @instance
39-
* @readonly
40+
* @type {Number}
41+
* @public
4042
*/
4143
port: number;
4244

4345
/**
44-
* A reference to the instance of `Database`.
46+
* A reference to the `Database` instance.
4547
*
4648
* @property store
47-
* @memberof Application
48-
* @instance
49-
* @readonly
49+
* @type {Database}
5050
* @private
5151
*/
5252
store: Database;
5353

5454
/**
55-
* A map containing each `Model` class in an application instance.
55+
* A reference to the `Logger` instance.
5656
*
57-
* @property models
58-
* @memberof Application
59-
* @instance
60-
* @readonly
57+
* @property logger
58+
* @type {Logger}
59+
* @private
6160
*/
62-
models: FreezeableMap<string, Class<Model>>;
61+
logger: Logger;
6362

6463
/**
65-
* A reference to the instance of `Logger`.
64+
* A reference to the `Router` instance.
6665
*
67-
* @property logger
68-
* @memberof Application
69-
* @instance
70-
* @readonly
66+
* @property router
67+
* @type {Router}
68+
* @private
7169
*/
72-
logger: Logger;
70+
router: Router;
7371

7472
/**
75-
* A map containing each `Controller` class in an application instance.
73+
* A reference to the `Server` instance.
7674
*
77-
* @property controllers
78-
* @memberof Application
79-
* @instance
80-
* @readonly
75+
* @property server
76+
* @type {Server}
77+
* @private
8178
*/
82-
controllers: FreezeableMap<string, Controller>;
79+
server: Server;
8380

8481
/**
85-
* A map containing each `Serializer` class in an application instance.
82+
* A map containing each `Model` class.
8683
*
87-
* @property serializers
88-
* @memberof Application
89-
* @instance
90-
* @readonly
84+
* @property models
85+
* @type {Map}
86+
* @private
9187
*/
92-
serializers: FreezeableMap<string, Serializer<*>>;
88+
models: FreezeableMap<string, Class<Model>>;
9389

9490
/**
95-
* A reference to the instance of `Router`.
91+
* A map containing each `Controller` instance.
9692
*
97-
* @property logger
98-
* @memberof Application
99-
* @instance
100-
* @readonly
93+
* @property controllers
94+
* @type {Map}
10195
* @private
10296
*/
103-
router: Router;
97+
controllers: FreezeableMap<string, Controller>;
10498

10599
/**
106-
* A reference to the instance of `Server`.
100+
* A map containing each `Serializer` instance.
107101
*
108-
* @property server
109-
* @memberof Application
110-
* @instance
111-
* @readonly
102+
* @property serializers
103+
* @type {Map}
112104
* @private
113105
*/
114-
server: Server;
106+
serializers: FreezeableMap<string, Serializer<*>>;
115107

116108
/**
117-
* Create an instance of `Application`.
118-
*
119-
* WARNING:
120-
* It is highly reccomended that you do not override this method.
109+
* @method constructor
110+
* @param {Object} config
111+
* @return {Promise}
112+
* @public
121113
*/
122114
constructor(opts: Application$opts): Promise<Application> {
123115
return initialize(this, merge(createDefaultConfig(), opts));

0 commit comments

Comments
 (0)