Skip to content

VincentBailly/local-package-store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Install a node dependency tree on disk.

The installation is done using a flat folder structure where packages are connected with symlinks. This package is meant to be used as a component of a package manager.

Features:

  • Install packages in a flat structure.
  • Install bin scripts.
  • Support package names with a namespace.
  • Multiple packages can have the same name (usefull to support various version or conflicting peerDependencies).

Usage:

const { installLocalStore } = require("local-package-store");

const location = "<path to an empty folder>";
const dependencyGraph = {
    nodes: [{
        key: "1",
        location: "location where the uninstalled package is on disk"
    },
    {
        key: "2",
        location: "location where the uninstalled package is on disk"
    }],
    links: [{ source: "1", target: "2"}]
}

installLocalStore(
    dependencyGraph,
    location
).then(() => {
    /* Installation is done */
})

The inputs are:

  • The dependency graph of packages. Contains a list of packages and a list of dependencies between them.
  • The location of a store. This is where the packages will be installed on disk.

About

Install dependency graph to a local store

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published