From d54e2b54d074f031a6193b27096b3ea815d09ae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Thu, 9 Oct 2014 16:34:39 +0200 Subject: [PATCH] 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`. --- index.js | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/index.js b/index.js index f135260..4651138 100644 --- a/index.js +++ b/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