Skip to content
Permalink
Browse files

docs(generic): cleanup API docs

  • Loading branch information
malept committed Jan 3, 2017
1 parent 6efa525 commit 9c118a4f3c6b9cc8c594cd8f74a85f1ab1081e96
Showing with 36 additions and 36 deletions.
  1. +7 −7 src/api/import.js
  2. +6 −6 src/api/init.js
  3. +4 −4 src/api/install.js
  4. +4 −4 src/api/lint.js
  5. +6 −6 src/api/make.js
  6. +3 −3 src/api/package.js
  7. +3 −3 src/api/publish.js
  8. +3 −3 src/api/start.js
@@ -15,18 +15,18 @@ const d = debug('electron-forge:import');

/**
* @typedef {Object} ImportOptions
* @property {string} [dir=process.cwd()] The path to the module to import
* @property {boolean} [interactive=false] Boolean, whether to use sensible defaults or prompt the user visually.
* @property {string} [dir=process.cwd()] The path to the app to be imported
* @property {boolean} [interactive=false] Whether to use sensible defaults or prompt the user visually
*/

/**
* Attempts to import a given module directory to the electron-forge standard.
* Attempt to import a given module directory to the Electron Forge standard.
*
* - Replaces the electron prebuilt with electron-compile
* - Sets up git and the correct NPM dependencies
* - Puts in a template forge config
* - Replaces the prebuilt electron package with the one that integrates with `electron-compile`
* - Sets up `git` and the correct NPM dependencies
* - Adds a template forge config to `package.json`
*
* @param {ImportOptions} options - Options for the Import method
* @param {ImportOptions} options - Options for the import method
* @return {Promise} Will resolve when the import process is complete
*/
export default async (providedOptions = {}) => {
@@ -13,16 +13,16 @@ const d = debug('electron-forge:init');

/**
* @typedef {Object} InitOptions
* @property {string} [dir=process.cwd()] The path to the module to import
* @property {boolean} [interactive=false] Boolean, whether to use sensible defaults or prompt the user visually.
* @property {string} [lintstyle=airbnb] The lintstyle to pass through to the template creater
* @property {string} [template] The custom template to use, if left empty will use the default template.
* @property {string} [dir=process.cwd()] The path to the app to be initialized
* @property {boolean} [interactive=false] Whether to use sensible defaults or prompt the user visually
* @property {string} [lintstyle=airbnb] The lintstyle to pass through to the template creator
* @property {string} [template] The custom template to use. If left empty, the default template is used
*/

/**
* Initializes a new electron-forge template project in the given directory
* Initialize a new Electron Forge template project in the given directory.
*
* @param {InitOptions} options - Options for the Import method
* @param {InitOptions} options - Options for the init method
* @return {Promise} Will resolve when the initialization process is complete
*/
export default async (providedOptions = {}) => {
@@ -23,16 +23,16 @@ const GITHUB_API = 'https://api.github.com';

/**
* @typedef {Object} InstallOptions
* @property {boolean} [interactive=false] Boolean, whether to use sensible defaults or prompt the user visually.
* @property {boolean} [interactive=false] Whether to use sensible defaults or prompt the user visually
* @property {boolean} [prerelease=false] Whether to install prerelease versions
* @property {string} repo The GitHub repository to install from, in the format owner/name
* @property {function} chooseAsset A function that must return the asset to use/install from a provided array of compatible GitHub assets.
* @property {function} chooseAsset A function that must return the asset to use/install from a provided array of compatible GitHub assets
*/

/**
* Installs an Electron application from GitHub. If you leave interactive as `false` you MUST provide a chooseAsset function.
* Install an Electron application from GitHub. If you leave interactive as `false`, you MUST provide a `chooseAsset` function.
*
* @param {InstallOptions} options - Options for the Install method
* @param {InstallOptions} options - Options for the install method
* @return {Promise} Will resolve when the install process is complete
*/
export default async (providedOptions = {}) => {
@@ -10,14 +10,14 @@ const d = debug('electron-forge:lint');
/**
* @typedef {Object} LintOptions
* @property {string} [dir=process.cwd()] The path to the module to import
* @property {boolean} [interactive=false] Boolean, whether to use sensible defaults or prompt the user visually.
* @property {boolean} [interactive=false] Whether to use sensible defaults or prompt the user visually
*/

/**
* Lints a local Electron application.
* Lint a local Electron application.
*
* The promise will be rejected with the stdout+stderr of the linting process if linting fails or will be resolved
* if it succeeds.
* The promise will be rejected with the stdout+stderr of the linting process if linting fails or
* will be resolved if it succeeds.
*
* @param {LintOptions} options - Options for the Lint method
* @return {Promise<null, string>} Will resolve when the lint process is complete
@@ -13,18 +13,18 @@ import packager from './package';

/**
* @typedef {Object} MakeOptions
* @property {string} [dir=process.cwd()] The path to the module to import
* @property {boolean} [interactive=false] Boolean, whether to use sensible defaults or prompt the user visually.
* @property {string} [dir=process.cwd()] The path to the app from which distributables are generated
* @property {boolean} [interactive=false] Whether to use sensible defaults or prompt the user visually
* @property {boolean} [skipPackage=false] Whether to skip the pre-make packaging step
* @property {Array<string>} [overrideTargets] An array of make targets to override your forge config
* @property {string} [arch=process.arch] The target arch
* @property {string} [platform=process.platform] The target platform. NOTE: This is limited to be the current platform at the moment
* @property {string} [arch=host architecture] The target architecture
* @property {string} [platform=process.platform] The target platform. NOTE: This is limited to be the current platform at the moment
*/

/**
* Makes distributables for an Electron application.
* Make distributables for an Electron application.
*
* @param {MakeOptions} options - Options for the Make method
* @param {MakeOptions} options - Options for the make method
* @return {Promise} Will resolve when the make process is complete
*/
export default async (providedOptions = {}) => {
@@ -15,14 +15,14 @@ import resolveDir from '../util/resolve-dir';

/**
* @typedef {Object} PackageOptions
* @property {string} [dir=process.cwd()] The path to the module to import
* @property {boolean} [interactive=false] Boolean, whether to use sensible defaults or prompt the user visually.
* @property {string} [dir=process.cwd()] The path to the app to package
* @property {boolean} [interactive=false] Whether to use sensible defaults or prompt the user visually
* @property {string} [arch=process.arch] The target arch
* @property {string} [platform=process.platform] The target platform. NOTE: This is limited to be the current platform at the moment
*/

/**
* Packages an Electron application into an platform dependent format.
* Package an Electron application into an platform dependent format.
*
* @param {PackageOptions} options - Options for the Package method
* @return {Promise} Will resolve when the package process is complete
@@ -10,16 +10,16 @@ import make from './make';

/**
* @typedef {Object} PublishOptions
* @property {string} [dir=process.cwd()] The path to the module to publish
* @property {boolean} [interactive=false] Boolean, whether to use sensible defaults or prompt the user visually.
* @property {string} [dir=process.cwd()] The path to the app to be published
* @property {boolean} [interactive=false] Whether to use sensible defaults or prompt the user visually
* @property {string} [authToken] An authentication token to use when publishing
* @property {string} [tag=packageJSON.version] The string to tag this release with
* @property {string} [target=github] The publish target
* @property {MakeOptions} [makeOptions] Options object to passed through to make()
*/

/**
* Packages an Electron application into an platform dependent format.
* Publish an Electron application into the given target service.
*
* @param {PublishOptions} options - Options for the Publish method
* @return {Promise} Will resolve when the publish process is complete
@@ -9,14 +9,14 @@ import resolveDir from '../util/resolve-dir';

/**
* @typedef {Object} StartOptions
* @property {string} [dir=process.cwd()] The path to the module to publish
* @property {boolean} [interactive=false] Boolean, whether to use sensible defaults or prompt the user visually
* @property {string} [dir=process.cwd()] The path to the app to be run
* @property {boolean} [interactive=false] Whether to use sensible defaults or prompt the user visually
* @property {boolean} [enableLogging=false] Enables advanced internal Electron debug calls
* @property {Array<string>} [args] Arguments to pass through to the launched Electron application
*/

/**
* Starts an Electron application
* Start an Electron application.
*
* @param {StartOptions} options - Options for the Publish method
* @return {Promise} Will resolve when the application is launched

0 comments on commit 9c118a4

Please sign in to comment.
You can’t perform that action at this time.