Class: Template

Template

Template for managers to follow. Since you are working with nodejs and most things are asyncronous, return a jQuery deferred (ES6 promises will come when the Chrome version is updated in brackets). Remember to resolve your deferred. Either resolve a single object or an array of objects.

Take a look at the bower class for examples of this.

To use Node, each command must be wrapped in a done function

Node.done(function(nodeComamnd) {
     var ls = nodeComamnd(dir._path, 'ls', ['-l', '-a']);
     ls.fail(function (err) {
         console.log('command failed', err);
     });
     ls.done(function (stdout) {
         console.log(stdout);
     });
  });

new Template()

Template for managers

Source:
See:

Methods

<static> getInstalled() → {Array}

Lists installed packages/dependencies

Source:
Returns:

Array of Result objects

Type
Array

<static> getReadme(packageName) → {String}

Gets the README URL of a package/dependency

Parameters:
Name Type Description
packageName String

A unique name of a package/dependency

Source:
Returns:

README URL of package/dependency

Type
String

<static> getUrl(packageName) → {String}

Gets the URL of a package/dependency

Parameters:
Name Type Description
packageName String

A unique name of a package/dependency

Source:
Returns:

URL of package/dependency

Type
String

<static> install(packageName) → {Status}

Install command

Parameters:
Name Type Description
packageName String

A unique name of a package/dependency to install

Source:
Returns:

Status object

Type
Status

<static> isAvailable() → {Object}

Determines if the manager is available/reachable from brackets-cardboard

Source:
Returns:

Object with keys of manager and displayAs

Type
Object

Search for package/dependency

Parameters:
Name Type Description
query String

Search query

Source:
Returns:

Array of Result objects

Type
Array

<static> uninstall(packageName) → {Status}

Uninstall command

Parameters:
Name Type Description
packageName String

A unique name of a package/dependency to uninstall

Source:
Returns:

Status object

Type
Status

<static> update(packageName) → {Status}

Update command

Parameters:
Name Type Description
packageName String

A unique name of a package/dependency to update

Source:
Returns:

Status object

Type
Status
Copyright © Kyle Hornberg 2014
Documentation generated by JSDoc 3.2.2 on Thu Apr 03 2014 13:07:01 GMT-0500 (CDT) using the DocStrap template.