mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Improve documentation, add to table of contents
Conflicts: docs/client/data.js docs/client/names.json
This commit is contained in:
@@ -3558,6 +3558,10 @@ package is exported to.
|
||||
{{> api_box pack_export }}
|
||||
{{> api_box pack_addFiles }}
|
||||
|
||||
{{#markdown}}
|
||||
Packages can also use NPM packages and Cordova/PhoneGap plugins. These will be automatically installed when someone adds the package.
|
||||
{{/markdown}}
|
||||
|
||||
|
||||
<h3 id="packagetests"><span>Unit Tests</span></h3>
|
||||
|
||||
@@ -3575,4 +3579,14 @@ in the `_test.js` file that was created.
|
||||
|
||||
{{> api_box pack_onTest }}
|
||||
|
||||
<h3><span>External Packages and Plugins</span></h3>
|
||||
|
||||
{{#markdown}}
|
||||
Meteor packages can include NPM packages and Cordova plugins by using `Npm.depends` and `Cordova.depends` in the `package.js` file.
|
||||
{{/markdown}}
|
||||
|
||||
{{> autoApiBox "Npm.depends"}}
|
||||
{{> autoApiBox "Npm.require"}}
|
||||
{{> autoApiBox "Cordova.depends"}}
|
||||
|
||||
</template>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -380,7 +380,10 @@ var toc = [
|
||||
{name: "api.export", id: "pack_export"},
|
||||
{name: "api.addFiles", id: "pack_addFiles"}
|
||||
],
|
||||
{name: "Package.onTest", id: "packagetests"}
|
||||
{name: "Package.onTest", id: "packagetests"},
|
||||
{name: "Npm.depends", id: "Npm-depends"},
|
||||
{name: "Npm.require", id: "Npm-require"},
|
||||
{name: "Cordova.depends", id: "Cordova-depends"}
|
||||
]
|
||||
],
|
||||
|
||||
|
||||
@@ -668,10 +668,10 @@ _.extend(PackageSource.prototype, {
|
||||
},
|
||||
|
||||
/**
|
||||
* @summary Require a package that was specified in your package.js using
|
||||
* @summary Require a package that was specified using
|
||||
* `Npm.depends()`.
|
||||
* @param {String} name The name of the package to require.
|
||||
* @locus package.js
|
||||
* @locus Server
|
||||
* @memberOf Npm
|
||||
*/
|
||||
require: function (name) {
|
||||
@@ -703,14 +703,16 @@ _.extend(PackageSource.prototype, {
|
||||
*/
|
||||
var Cordova = {
|
||||
/**
|
||||
* @summary Specify which [Cordova / PhoneGap](https://www.npmjs.org/)
|
||||
* @summary Specify which [Cordova / PhoneGap](http://cordova.apache.org/)
|
||||
* packages your Meteor package depends on.
|
||||
* @param {Object} dependencies An object where the keys are package
|
||||
* names and the values are version numbers in string form.
|
||||
* Example:
|
||||
*
|
||||
* ```js
|
||||
* Cordova.depends({ "org.apache.cordova.camera":"0.3.0" });
|
||||
* Cordova.depends({
|
||||
* "org.apache.cordova.camera":"0.3.0"
|
||||
* });
|
||||
* ```
|
||||
* @locus package.js
|
||||
* @memberOf Cordova
|
||||
|
||||
Reference in New Issue
Block a user