rollup-plugin-post-replace

replace content after bundling

https://github.com/discontinued/rollup-plugin-post-replace
Last updated 3 years ago by epiloque .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install rollup-plugin-post-replace 
SYNC missed versions from official npm registry.

rollup-plugin-post-replace

NPM version Build Status

Installation

npm install --save-dev rollup-plugin-post-replace

Usage

import { rollup } from 'rollup';
import replace from 'rollup-plugin-post-replace';

rollup({
  entry: 'main.js',
  plugins: [
    replace({
      ENVIRONMENT: JSON.stringify( 'production' )
    })
  ]
}).then(...)

Options

{
  // To replace every occurence of `<@foo@>` instead of every
  // occurence of `foo`, supply delimiters
  delimiters: [ '<@', '@>' ],

  // All other options are treated as `string: replacement`
  // replacers...
  VERSION: '1.0.0',
  ENVIRONMENT: JSON.stringify( 'development' ),

  // ...unless you want to be careful about separating
  // values from other options, in which case you can:
  values: {
    VERSION: '1.0.0',
    ENVIRONMENT: JSON.stringify( 'development' )
  }
}

Thanks

Thanks to Rich Harris and the rollup community.

License

rollup-plugin-post-replace is released under the terms of the MIT License.

This software includes or is derivative of works distributed under the licenses listed below. Please refer to the specific files and/or packages for more detailed information about the authors, copyright notices, and licenses.

Current Tags

  • 1.0.0                                ...           latest (3 years ago)

1 Versions

  • 1.0.0 [deprecated]           ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 10
Dependencies (1)
Dev Dependencies (2)

Copyright 2014 - 2017 © taobao.org |