| { |
| "name": "cordova-serve", |
| "version": "1.0.0", |
| "description": "Apache Cordova server support for cordova-lib and cordova-browser.", |
| "main": "serve.js", |
| "repository": { |
| "type": "git", |
| "url": "git://git-wip-us.apache.org/repos/asf/cordova-lib.git" |
| }, |
| "keywords": [ |
| "cordova", |
| "server", |
| "apache" |
| ], |
| "author": { |
| "name": "Apache Software Foundation" |
| }, |
| "license": "Apache-2.0", |
| "bugs": { |
| "url": "https://issues.apache.org/jira/browse/CB", |
| "email": "dev@cordova.apache.org" |
| }, |
| "dependencies": { |
| "chalk": "^1.1.1", |
| "compression": "^1.6.0", |
| "express": "^4.13.3", |
| "q": "^1.4.1" |
| }, |
| "devDependencies": { |
| "jshint": "^2.8.0" |
| }, |
| "scripts": { |
| "jshint": "node node_modules/jshint/bin/jshint src" |
| }, |
| "engines": { |
| "node": ">= 0.12.0", |
| "npm": ">= 2.5.1" |
| }, |
| "readme": "<!--\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License. You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n-->\n\n# cordova-serve\nThis module can be used to serve up a Cordova application in the browser. It has no command-line, but rather is intended\nto be called using the following API:\n\n``` js\nvar serve = require('cordova-serve');\nserve.launchServer(opts);\nserve.servePlatform(platform, opts);\nserve.launchBrowser(ops);\n```\n\n## launchServer()\n\n``` js\nlaunchServer(opts);\n```\n\nLaunches a server with the specified options. Parameters:\n\n* **opts**: Options, as described below.\n\n## servePlatform()\n\n``` js\nservePlatform(platform, opts);\n```\n\nLaunches a server that serves up any Cordova platform (e.g. `browser`, `android` etc) from the current project.\nParameters:\n\n* **opts**: Options, as described below. Note that for `servePlatform()`, the `root` value should be a Cordova project's\n root folder, or any folder within it - `servePlatform()` will replace it with the platform's `www_dir` folder. If this\n value is not specified, the *cwd* will be used.\n\n## launchBrowser()\n\n``` js\nlaunchBrowser(opts);\n```\n\nLaunches a browser window pointing to the specified URL. The single parameter is an options object that supports the\nfollowing values (both optional):\n\n* **url**: The URL to open in the browser.\n* **target**: The name of the browser to launch. Can be any of the following: `chrome`, `chromium`, `firefox`, `ie`,\n `opera`, `safari`. If no browser is specified, \n\n## The *opts* Options Object\nThe opts object passed to `launchServer()` and `servePlatform()` supports the following values (all optional):\n\n* **root**: The file path on the local file system that is used as the root for the server, for default mapping of URL\n path to local file system path. \n* **port**: The port for the server. Note that if this port is already in use, it will be incremented until a free port\n is found.\n* **router**: An `ExpressJS` router. If provided, this will be attached *before* default static handling.\n* **noLogOutput**: If `true`, turns off all log output. \n* **noServerInfo**: If `true`, cordova-serve won't output `Static file server running on...` message.\n* **events**: An `EventEmitter` to use for logging. If provided, logging will be output using `events.emit('log', msg)`.\n If not provided, `console.log()` will be used. Note that nothing will be output in either case if `noLogOutput` is `true`.\n", |
| "readmeFilename": "README.md", |
| "_id": "cordova-serve@1.0.0", |
| "_shasum": "7fa1c40183d2b82adb792f9cb9e0d554a23eed85", |
| "_resolved": "https://registry.npmjs.org/cordova-serve/-/cordova-serve-1.0.0.tgz", |
| "_from": "cordova-serve@>=1.0.0 <2.0.0" |
| } |