@ethronpi/npm

0.3.0 • Public • Published

@ethronpi/npm

NPM version Total downloads

Ethron.js plugin for running NPM commands.

Developed in Dogma, compiled to JavaScript.

Engineered in Valencia, Spain, EU by EthronLabs.

Use

const npm = require("@ethronpi/npm");

npm.install task

This task installs a package:

npm.install({pkg, global, force, loglevel})
  • pkg (string, required). The package name or folder.
  • global (bool). Would you like to install it globally? Default: false.
  • force (bool). Would you like to force the installation? Default: false.
  • loglevel (string). Log level: silent, error, warn, notice, info...

npm.uninstall task

This task uninstalls a package:

npm.uninstall({pkg, global})
  • pkg (string, required). The package name.
  • global (bool). Would you like to uninstall it globally? Default: false.

npm.publish task

This task publishes a package in NPM:

npm.publish({path, who, access, tag})
  • path (string, required). Folder path.
  • who (string). The user name to use. If npm who returns another, the task fails.
  • access (string): public or restricted.
  • tag (string). The publication tag.

npm.who task

This task returns the npm who command:

npm.who() : string

npm.bin task

This task runs a command from the ./node_modules/.bin folder:

bin({cmd, args})
  • cmd (string, required). Command to run.
  • args (string). Arguments.
  • detach (bool). Would you like to detach process? Default: false.

Example:

npm.bin({
  cmd: "http-server",
  args: "dist -p 8080 -c-1",
  detach: true
});

npm.run

This task runs a script:

run({script})
  • script (string, required). Script to run.

Example:

npm.run({
  script: "test"
});

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.3.00latest

Version History

VersionDownloads (Last 7 Days)Published
0.3.00

Package Sidebar

Install

npm i @ethronpi/npm

Weekly Downloads

0

Version

0.3.0

License

none

Unpacked Size

9.93 kB

Total Files

9

Last publish

Collaborators

  • ethronpi