Skip to content
This repository has been archived by the owner on Jan 13, 2020. It is now read-only.

Module to download SAFE client native libs and required dependencies for frontend applications

License

BSD-3-Clause, MIT licenses found

Licenses found

BSD-3-Clause
LICENSE-BSD
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

maidsafe-archive/deps_downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deps_downloader

Cli to download assets and libraries on demand for your project. Inspired by electron-download but more universal.

Note this repository is no longer maintained. For the latest on the SAFE Network project please see safenetwork.tech or our community forum safenetforum.org

Installation

Add to your project via npm install --save

Configuration

Simple

The simplest configuration is if you only have one item to download, which follows the electron conventions. Like electron itself. For that just add to your package.json's script-section:

    "postinstall": "deps_downloader --filename electron --version 1.6.1 --filePattern
    \"electron$\" "

Complex

To allow for more complex configurations, you can also add a top-level section download_deps in the package.json and run deps_downloader --package package.json in your postinstall-section. Example:

    "scripts" : {
        "postinstall": "deps_downloader --package package.json"
    },
    "download_deps": {
        "electron" : {
            "version": "1.6.1"
            "filePattern": "electron$"
        },
        "ENV" : {
            "test" : {
                "version": "1.5.0",
                "override": false
            }
            "win32" : {
                "electron" : {
                    "filePattern": "electron.exe$"
                    "disabled": true
                }
            },
            "mobile": {
              "electron": {
                "disabled": true
              }
            }
        }
    }

This example does the same as before but now overwrites the filePattern to electron.exe on windows systems and uses the version 1.5.1 in case it is run in NODE_ENV='test'. You can add any number of entries in download_deps each containing a configuration set except for ENV which contains the overwrites.

ENV may contain any NODE_ENV environment (default is dev). Each environment or platform may contain extra entries. Any Platform may also contain a ENV entry with other node-env environment overwrites. See [examples/complex.json] for a complex version.

A disabled property may be added for a particular environment variable condition in order to prevent a default file from being downloaded.

If intending to download more than one version of a file, use the override property to prevent the the default configuration from being overwritten.

License

This SAFE Network library is dual-licensed under the Modified BSD (LICENSE-BSD https://opensource.org/licenses/BSD-3-Clause) or the MIT license (LICENSE-MIT https://opensource.org/licenses/MIT) at your option.

Contribution

Copyrights in the SAFE Network are retained by their contributors. No copyright assignment is required to contribute to this project.

About

Module to download SAFE client native libs and required dependencies for frontend applications

Resources

License

BSD-3-Clause, MIT licenses found

Licenses found

BSD-3-Clause
LICENSE-BSD
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published