{
  "manifest": {
    "name": "@rollup/plugin-replace",
    "version": "2.4.2",
    "publishConfig": {
      "access": "public"
    },
    "description": "Replace strings in files while bundling",
    "license": "MIT",
    "repository": {
      "type": "git",
      "url": "https://github.com/rollup/plugins.git"
    },
    "author": {
      "name": "Rich Harris",
      "email": "richard.a.harris@gmail.com"
    },
    "homepage": "https://github.com/rollup/plugins/tree/master/packages/replace#readme",
    "bugs": {
      "url": "https://github.com/rollup/plugins/issues"
    },
    "main": "dist/rollup-plugin-replace.cjs.js",
    "module": "dist/rollup-plugin-replace.es.js",
    "scripts": {
      "build": "rollup -c",
      "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
      "ci:lint": "pnpm run build && pnpm run lint",
      "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
      "ci:test": "pnpm run test -- --verbose && pnpm run test:ts",
      "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
      "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md",
      "lint:js": "eslint --fix --cache src test types --ext .js,.ts",
      "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
      "prebuild": "del-cli dist",
      "prepare": "pnpm run build",
      "prepublishOnly": "pnpm run lint && pnpm run test",
      "pretest": "pnpm run build",
      "test": "ava",
      "test:ts": "tsc types/index.d.ts test/types.ts --noEmit"
    },
    "files": [
      "dist",
      "src",
      "types",
      "README.md"
    ],
    "keywords": [
      "rollup",
      "plugin",
      "replace",
      "es2015",
      "npm",
      "modules"
    ],
    "peerDependencies": {
      "rollup": "^1.20.0 || ^2.0.0"
    },
    "dependencies": {
      "@rollup/pluginutils": "^3.1.0",
      "magic-string": "^0.25.7"
    },
    "devDependencies": {
      "@rollup/plugin-buble": "^0.21.3",
      "del-cli": "^3.0.1",
      "locate-character": "^2.0.5",
      "rollup": "^2.23.0",
      "source-map": "^0.7.3",
      "typescript": "^3.9.7"
    },
    "types": "types/index.d.ts",
    "ava": {
      "babel": {
        "compileEnhancements": false
      },
      "files": [
        "!**/fixtures/**",
        "!**/helpers/**",
        "!**/recipes/**",
        "!**/types.ts"
      ]
    },
    "_registry": "npm",
    "_loc": "/homez.1033/heliovt/.cache/yarn/v6/npm-@rollup-plugin-replace-2.4.2-a2d539314fbc77c244858faa523012825068510a-integrity/node_modules/@rollup/plugin-replace/package.json",
    "readmeFilename": "README.md",
    "readme": "[npm]: https://img.shields.io/npm/v/@rollup/plugin-replace\n[npm-url]: https://www.npmjs.com/package/@rollup/plugin-replace\n[size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-replace\n[size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-replace\n\n[![npm][npm]][npm-url]\n[![size][size]][size-url]\n[![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)\n\n# @rollup/plugin-replace\n\n🍣 A Rollup plugin which replaces targeted strings in files while bundling.\n\n## Requirements\n\nThis plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.\n\n## Install\n\nUsing npm:\n\n```console\nnpm install @rollup/plugin-replace --save-dev\n```\n\n## Usage\n\nCreate a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:\n\n```js\nimport replace from '@rollup/plugin-replace';\n\nexport default {\n  input: 'src/index.js',\n  output: {\n    dir: 'output',\n    format: 'cjs'\n  },\n  plugins: [\n    replace({\n      'process.env.NODE_ENV': JSON.stringify('production'),\n      __buildDate__: () => JSON.stringify(new Date()),\n      __buildVersion: 15\n    })\n  ]\n};\n```\n\nThen call `rollup` either via the [CLI](https://www.rollupjs.org/guide/en/#command-line-reference) or the [API](https://www.rollupjs.org/guide/en/#javascript-api).\n\nThe configuration above will replace every instance of `process.env.NODE_ENV` with `\"production\"` and `__buildDate__` with the result of the given function in any file included in the build.\n\n_Note: Values must be either primitives (e.g. string, number) or `function` that returns a string. For complex values, use `JSON.stringify`. To replace a target with a value that will be evaluated as a string, set the value to a quoted string (e.g. `\"test\"`) or use `JSON.stringify` to preprocess the target string safely._\n\nTypically, `@rollup/plugin-replace` should be placed in `plugins` _before_ other plugins so that they may apply optimizations, such as dead code removal.\n\n## Options\n\nIn addition to the properties and values specified for replacement, users may also specify the options below.\n\n### `delimiters`\n\nType: `Array[...String, String]`<br>\nDefault: `['\\b', '\\b']`\n\nSpecifies the boundaries around which strings will be replaced. By default, delimiters are [word boundaries](https://www.regular-expressions.info/wordboundaries.html). See [Word Boundaries](#word-boundaries) below for more information.\n\n### `preventAssignment`\n\nType: `Boolean`<br>\nDefault: `false`\n\nPrevents replacing strings where they are followed by a single equals sign. For example, where the plugin is called as follows:\n\n```js\nreplace({\n  values: {\n    'process.env.DEBUG': 'false'\n  }\n});\n```\n\nObserve the following code:\n\n```js\n// Input\nprocess.env.DEBUG = false;\nif (process.env.DEBUG == true) {\n  //\n}\n// Without `preventAssignment`\nfalse = false; // this throws an error because false cannot be assigned to\nif (false == true) {\n  //\n}\n// With `preventAssignment`\nprocess.env.DEBUG = false;\nif (false == true) {\n  //\n}\n```\n\n### `exclude`\n\nType: `String` | `Array[...String]`<br>\nDefault: `null`\n\nA [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should _ignore_. By default no files are ignored.\n\n### `include`\n\nType: `String` | `Array[...String]`<br>\nDefault: `null`\n\nA [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default all files are targeted.\n\n### `values`\n\nType: `{ [key: String]: Replacement }`, where `Replacement` is either a string or a `function` that returns a string.\nDefault: `{}`\n\nTo avoid mixing replacement strings with the other options, you can specify replacements in the `values` option. For example, the following signature:\n\n```js\nreplace({\n  include: ['src/**/*.js'],\n  changed: 'replaced'\n});\n```\n\nCan be replaced with:\n\n```js\nreplace({\n  include: ['src/**/*.js'],\n  values: {\n    changed: 'replaced'\n  }\n});\n```\n\n## Word Boundaries\n\nBy default, values will only match if they are surrounded by _word boundaries_.\n\nConsider the following options and build file:\n\n```js\nmodule.exports = {\n  ...\n  plugins: [replace({ changed: 'replaced' })]\n};\n```\n\n```js\n// file.js\nconsole.log('changed');\nconsole.log('unchanged');\n```\n\nThe result would be:\n\n```js\n// file.js\nconsole.log('replaced');\nconsole.log('unchanged');\n```\n\nTo ignore word boundaries and replace every instance of the string, wherever it may be, specify empty strings as delimiters:\n\n```js\nexport default {\n  ...\n  plugins: [\n    replace({\n      changed: 'replaced',\n      delimiters: ['', '']\n    })\n  ]\n};\n```\n\n## Meta\n\n[CONTRIBUTING](/.github/CONTRIBUTING.md)\n\n[LICENSE (MIT)](/LICENSE)\n",
    "licenseText": "The MIT License (MIT)\n\nCopyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  "artifacts": [],
  "remote": {
    "resolved": "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-2.4.2.tgz#a2d539314fbc77c244858faa523012825068510a",
    "type": "tarball",
    "reference": "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-2.4.2.tgz",
    "hash": "a2d539314fbc77c244858faa523012825068510a",
    "integrity": "sha512-IGcu+cydlUMZ5En85jxHH4qj2hta/11BHq95iHEyb2sbgiN0eCdzvUcHw5gt9pBL5lTi4JDYJ1acCoMGpTvEZg==",
    "registry": "npm",
    "packageName": "@rollup/plugin-replace",
    "cacheIntegrity": "sha512-IGcu+cydlUMZ5En85jxHH4qj2hta/11BHq95iHEyb2sbgiN0eCdzvUcHw5gt9pBL5lTi4JDYJ1acCoMGpTvEZg== sha1-otU5MU+8d8JEhY+qUjASglBoUQo="
  },
  "registry": "npm",
  "hash": "a2d539314fbc77c244858faa523012825068510a"
}