0.1.0 • Published 7 years ago

download-json-webpack-plugin v0.1.0

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

##How it works

Loads JSON from given URL and saves it locally.

##Usage

const DownloadJsonPlugin = require('download-json-webpack-plugin');
module.exports = {
  plugins: [
    new DownloadJsonPlugin({
      path: '<JSON URL>',
      filename: 'local.json',
      onBeforeSave: (json) => parseJson
    })
  ]
}

##Options

  • path remote URL of the JSON to download
  • filename filename where loaded JSON will be saved
  • onBeforeSave optional function that can modify loaded data. It should return object that will be saved.
0.1.0

7 years ago