Download (and optionally extract) files into your project before your project starts generating
JavaScript CoffeeScript Other
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
source
test
.babelrc
.editorconfig
.eslintrc.js
.gitignore
.npmignore
.travis.yml
CONTRIBUTING.md
HISTORY.md
LICENSE.md
README.md
docpad-setup.sh
index.js
package-lock.json
package.json
test.js

README.md

Downloader Plugin for DocPad

Travis CI Build Status NPM version NPM downloads Dependency Status Dev Dependency Status
Patreon donate button Open Collective donate button Flattr donate button PayPal donate button Bitcoin donate button Wishlist browse button
Slack community badge

Download (and optionally extract) files into your project before your project starts generating

Install

docpad install downloader

Usage

Define the following inside your docpad configuration file, changing the repo values to what you desire:

module.exports =
    plugins:
        downloader:
            downloads: [
                {
                    name: 'Zip Bundle'
                    path: 'src/documents/zip'
                    url: 'https://gist.github.com/balupton/5432249/archive/dd29c677a72fd7ca53c5aadf5437a4167b389a21.zip',
                    decompress: {strip: 1}
                },
                {
                    name: 'Tar Bundle'
                    path: 'src/documents/tar'
                    url: 'https://gist.github.com/balupton/5432249/archive/dd29c677a72fd7ca53c5aadf5437a4167b389a21.tar.gz',
                    decompress: {strip: 1}
                }
                {
                    name: 'Gist File'
                    path: 'src/documents/a.html.md'
                    url: 'https://gist.github.com/balupton/5432249/raw/1e1cd6d374d0565aaab30566ec9055219d857aec/a.html.md'
                }
            ]

Available download options:

  • name string, name of the download, for logging purposes only
  • path string, path that the completed download is placed
  • url string, url the download is retrieved from
  • decompress true or object, if object it is the options sent to decompress

History

Discover the release history by heading on over to the HISTORY.md file.

Contribute

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

Backers

Maintainers

These amazing people are maintaining this project:

Sponsors

No sponsors yet! Will you be the first?

Patreon donate button Open Collective donate button Flattr donate button PayPal donate button Bitcoin donate button Wishlist browse button

Contributors

These amazing people have contributed code to this project:

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

License

Unless stated otherwise all works are:

and licensed under: