Clean up jsdoc comments.
- Fix formatting to improve the way how the text is rendered on http://apidocs.strongloop.com/loopback-boot/ - Add `@property` entry for `options.appConfigRootDir`.
This commit is contained in:
parent
18121a4208
commit
d54e2b54d0
45
index.js
45
index.js
|
@ -25,44 +25,49 @@ var addInstructionsToBrowserify = require('./lib/bundler');
|
|||
*
|
||||
* 3. Configures the LoopBack Application object from the `config.json` file
|
||||
* in the application root directory. These properties can be accessed
|
||||
* using app.get('propname').
|
||||
* using `app.get('propname')`.
|
||||
*
|
||||
* If the argument is an object, then it looks for `models`, `dataSources`,
|
||||
* 'config', modelRootDir, dsRootDir, appConfigRootDir and `appRootDir`
|
||||
* 'config', `modelsRootDir`, `dsRootDir`, `appConfigRootDir` and `appRootDir`
|
||||
* properties of the object.
|
||||
*
|
||||
* If the object has no `appRootDir` property then it sets the current working
|
||||
* directory as the application root directory.
|
||||
* The execution environment, {env}, is establised from, in order,
|
||||
* 'options.env',
|
||||
* Process.env.NODE_ENV,
|
||||
* the literal 'development'
|
||||
*
|
||||
* The execution environment, {env}, is established from, in order,
|
||||
* - `options.env`
|
||||
* - `process.env.NODE_ENV`,
|
||||
* - the literal `development`.
|
||||
*
|
||||
* Then it:
|
||||
*
|
||||
* 1. Creates DataSources from the `options.dataSources` object, if provided;
|
||||
* otherwise, it searches for the files
|
||||
* 'datasources.json',
|
||||
* 'datasources.local.js' or 'datasources.local.json' (only one),
|
||||
* 'datasources.{env}.js' or 'datasources.{env}.json' (only one)
|
||||
* 1. Creates DataSources from the `options.dataSources` object, if provided;
|
||||
* otherwise, it searches for the files
|
||||
* - `datasources.json`,
|
||||
* - `datasources.local.js` or `datasources.local.json` (only one),
|
||||
* - `datasources.{env}.js` or `datasources.{env}.json` (only one)
|
||||
*
|
||||
* in the directory designated by 'options.dsRootDir', if present, or the
|
||||
* application root directory. It merges the data source definitions from
|
||||
* the files found.
|
||||
*
|
||||
* 2. Creates Models from the `options.models` object, if provided;
|
||||
* 2. Creates Models from the `options.models` object, if provided;
|
||||
* otherwise, it searches for the files
|
||||
* 'model-config.json',
|
||||
* 'model-config.local.js' or 'model-config.local.json' (only one),
|
||||
* 'model-config.{env}.js' or 'model-config.{env}.json' (only one)
|
||||
* - `model-config.json`,
|
||||
* - `model-config.local.js` or `model-config.local.json` (only one),
|
||||
* - `model-config.{env}.js` or `model-config.{env}.json` (only one)
|
||||
*
|
||||
* in the directory designated by 'options.modelsRootDir', if present, or
|
||||
* the application root directory. It merges the model definitions from the
|
||||
* files found.
|
||||
*
|
||||
* 3. Configures the Application object from the `options.config` object,
|
||||
* 3. Configures the Application object from the `options.config` object,
|
||||
* if provided;
|
||||
* otherwise, it searches for the files
|
||||
* 'config.json',
|
||||
* 'config.local.js' or 'config.local.json' (only one),
|
||||
* 'config.{env}.js' or 'config.{env}.json' (only one)
|
||||
* - `config.json`,
|
||||
* - `config.local.js` or `config.local.json` (only one),
|
||||
* - `config.{env}.js` or `config.{env}.json` (only one)
|
||||
*
|
||||
* in the directory designated by 'options.appConfigRootDir', if present, or
|
||||
* the application root directory. It merges the properties from the files
|
||||
* found.
|
||||
|
@ -89,6 +94,8 @@ var addInstructionsToBrowserify = require('./lib/bundler');
|
|||
* @property {String} [appRootDir] Directory to use when loading JSON and
|
||||
* JavaScript files.
|
||||
* Defaults to the current directory (`process.cwd()`).
|
||||
* @property {String} [appConfigRootDir] Directory to use when loading
|
||||
* `config.json`. Defaults to `appRootDir`.
|
||||
* @property {Object} [models] Object containing `Model` configurations.
|
||||
* @property {Object} [dataSources] Object containing `DataSource` definitions.
|
||||
* @property {String} [modelsRootDir] Directory to use when loading
|
||||
|
|
Loading…
Reference in New Issue