Home Reference Source Test Repository
import Npm from 'plugged-in/src/Npm.js'
public class | source

Npm

Utility class used by the PluginManager to discover and load plugins.

Static Method Summary

Static Public Methods
public static

Find package.json file.

Constructor Summary

Public Constructor
public

constructor(config: Object)

Create a new instance.

Method Summary

Public Methods
public

Execute shell command.

public

generateConfig(manager: String, filePath: String): Object

Generates a plugin list.

Static Public Methods

public static findPackage(dir: String): Object source

Find package.json file.

Params:

NameTypeAttributeDescription
dir String
  • optional

optional directory to search

Return:

Object

package

Public Constructors

public constructor(config: Object) source

Create a new instance.

Params:

NameTypeAttributeDescription
config Object

config object

Public Methods

public executeShell(command: String): String source

Execute shell command.

Params:

NameTypeAttributeDescription
command String

command line command

Return:

String

output

public generateConfig(manager: String, filePath: String): Object source

Generates a plugin list.

Params:

NameTypeAttributeDescription
manager String

event context

filePath String

path to new file

Return:

Object

generated config