Socket
Book a DemoInstallSign in
Socket

file-dependencies

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

file-dependencies

Allows to specify fileDependencies in package.json to fetch local and remote files

latest
npmnpm
Version
1.2.1
Version published
Maintainers
1
Created
Source

#fileDependencies support for package.json

This module extends package.json with an additional property: fileDependencies.

With fileDependencies it is possible to express project dependencies based on files located somewhere else in the filesystem or avalaible somewhere on the internet.

If a node projects requires some additional libraries or binaries that do not come from NPM – maybe they are developed in other languages it is possible to fetch them as file dependencies.

#Example

{
  "name": "file-dependencies",
  "version": "1.0.0",
  "author": "Massimiliano Marcon <me@marcon.me> (http://marcon.me)",
  "license": "MIT",
  "dependencies": {
    "q": "^1.1.2",
    "request": "^2.53.0",
    "file-dependencies": "1.0.0"
  },
  "fileDependencies": {
    "selenium-server-standalone.jar": "http://selenium-release.storage.googleapis.com/2.43/selenium-server-standalone-2.43.1.jar",
  }
}

With this package.json NPM will fetch the file-dependencies module, and then selenium-server-standalone-2.43.1.jar will be downloaded from the Selenium website and copied in node_modules/file_dependencies. The downloaded file will be named selenium-server-standalone.jar.

From the application it will be possible to use child process to instantiate the selenium server.

#Platform/Architecture specific binaries

It is possible to describe file dependencies with an object format in order to target specific platforms and architectures.

"fileDependencies": {
  "selenium-server-standalone.jar": {
    "darwin": "http://chromedriver.storage.googleapis.com/2.14/chromedriver_mac32.zip",
    "linux": {
        "ia32": "http://chromedriver.storage.googleapis.com/2.14/chromedriver_linux32.zip",
        "x64": "http://chromedriver.storage.googleapis.com/2.14/chromedriver_linux64.zip"
    },
    "win32": "http://chromedriver.storage.googleapis.com/2.14/chromedriver_win32.zip"
  }
}

#TODO

  • Automatic archive decompression (zip, tar.gz)

Keywords

npm

FAQs

Package last updated on 10 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts