Skip to content

huntc/npm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm

This is a JVM wrapper around the Node Package Manager (NPM). The NPM that is run is the real NPM. The JS Engine project is used to execute NPM either using Trireme (a Node API implementation) or Node itself.

A WebJar is used to download the NPM source files.

Some sample usage from Scala:

    val engine = system.actorOf(Node.props(), "engine")
    val to = new File(new File("target"), "webjars")
    val cacheFile = new File(to, "extraction-cache")
    
    val npm = new Npm(engine, NpmLoader.load(to, cacheFile, Main.getClass.getClassLoader))
    
    for (
      result <- npm.update()  // Perform an "npm update"
      
    ) {
      println(s"status\n======\n${result.exitValue}\n")
      println(s"output\n======\n${new String(result.output.toArray, "UTF-8")}\n")
      println(s"error\n=====\n${new String(result.error.toArray, "UTF-8")}\n")

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages