docpad-plugin-downloader

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

Downloader Plugin for DocPad


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

docpad install downloader

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

module.exports =
    plugins:
        downloader:
            downloads: [
                {
                    name: 'Gist Bundle'
                    path: 'src/documents/gist'
                    url: 'https://gist.github.com/balupton/5432249/download'
                    tarExtractClean: true
                }
                {
                    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
  • deflate boolean, whether or not we should deflate the response when fetching the download (auto-detected if not set)
  • gzip boolean, whether or not we should unzip the response when fetching the download (auto-detected if not set)
  • tarExtract boolean, whether or not we should extract tar downloads (auto-detected if not set)
  • tarExtractClean boolean, whether or not when performing a tar extraction if we should remove the root directory of the extracted files

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

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

These amazing people are maintaining this project:

  • Benjamin Lupton b@lupton.cc (https://github.com/balupton)

No sponsors yet! Will you be the first?

These amazing people have contributed code to this project:

Become a contributor!

Licensed under the incredibly permissive MIT license

Copyright © 2012+ Bevry Pty Ltd us@bevry.me (http://bevry.me)