justo.plugin.npm

1.0.0-alpha2.10 • Public • Published

justo.plugin.npm

Justo plugin for running NPM commands. It is local and SSH-compatible.

Developed in Dogma, compiled to JavaScript.

Made in Valencia, Spain, EU by Justo Labs.

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})
  • path (string, required). Folder path.
  • who (string). The user name to use. If npm who returns another, the task fails.

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:

exec({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"
});

Readme

Keywords

none

Package Sidebar

Install

npm i justo.plugin.npm

Homepage

justo.rocs

Weekly Downloads

17

Version

1.0.0-alpha2.10

License

none

Unpacked Size

8.02 kB

Total Files

9

Last publish

Collaborators

  • justojs