chore(deps-dev): bump flatted from 3.3.3 to 3.4.2 (#87)
Bumps flatted from 3.3.3 to 3.4.2.
updated-dependencies:
- dependency-name: flatted dependency-version: 3.4.2 dependency-type: indirect …
Signed-off-by: dependabot[bot] support@github.com Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
cordova-serve
This module provides a JavaScript API to serve up a Cordova application in the browser.
API Example:
API Methods
launchServer()Launches a local HTTP server.
Code Example:
Parameters:
Return:
Returns a resolved or rejected promise depending on if the server had launched successfully.
On a fulfilled promise, the following properties are available on the returned object:
servehttp.Serverinstance.rootrootthat was specified, orcwdif none specified.port8000, or the incremented value of the chosen port when the chosen port is already in use).servePlatform()Launches a server that serves up any Cordova platform (e.g.
browser,android, etc) from the current project.Code Example:
Parameters:
Return:
Note that for
servePlatform(), therootvalue should be a Cordova project’s root folder or any folder within it.servePlatform()will replace it with the platform’swww_dirfolder. If this value is not specified, the cwd will be used.Returns a resolved or rejected promise depending on if the server had launched successfully.
On a fulfilled promise, the following properties are available on the returned object:
servehttp.Serverinstance.rootwwwfolder.projectRootport8000, or incremented value of the chosen port when already in use).launchBrowser()Launches a browser window pointing to the specified URL.
Code Example:
Parameters:
urltargetchrome,chromium,firefox,ie,opera,safari,edge. (Default: System Default)dataDirtemp_chrome_user_data_dir_for_cordova)userArgsReturn:
Returns a resolved or rejected promise depending on if the browser had launched successfully.
launchServer & servePlatform Options
The
optionsobject passed tolaunchServer()andservePlatform()supports the following values (all optional):rootportrouterExpressJSrouter. If provided, this will be attached before default static handling.noLogOutputnoServerInfotrue, theStatic file server running on...message will not be outputed.eventsEventEmitterto use for logging. If provided, logging will be output usingevents.emit('log', msg). If not provided,console.log()will be used. Note that nothing will be output in either case ifnoLogOutputistrue.