REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 2.94 KB
Close
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/@rollup/plugin-json/README.md
Text
Base64
[npm]: https://img.shields.io/npm/v/@rollup/plugin-json [npm-url]: https://www.npmjs.com/package/@rollup/plugin-json [size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-json [size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-json [![npm][npm]][npm-url] [![size][size]][size-url] [](https://liberamanifesto.com) # @rollup/plugin-json 🍣 A Rollup plugin which Converts .json files to ES6 modules. ## Requirements This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v14.0.0+) and Rollup v1.20.0+. ## Install Using npm: ```console npm install @rollup/plugin-json --save-dev ``` ## Usage Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin: ```js import json from '@rollup/plugin-json'; export default { input: 'src/index.js', output: { dir: 'output', format: 'cjs' }, plugins: [json()] }; ``` Then 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). With an accompanying file `src/index.js`, the local `package.json` file would now be importable as seen below: ```js // src/index.js import { readFileSync } from 'fs'; const pkg = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8')); console.log(`running version ${pkg.version}`); ``` ## Options ### `compact` Type: `Boolean`<br> Default: `false` If `true`, instructs the plugin to ignore `indent` and generates the smallest code. ### `exclude` Type: `String` | `Array[...String]`<br> Default: `null` A [picomatch pattern](https://github.com/micromatch/picomatch), or array of patterns, which specifies the files in the build the plugin should _ignore_. By default no files are ignored. ### `include` Type: `String` | `Array[...String]`<br> Default: `null` A [picomatch pattern](https://github.com/micromatch/picomatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default all files are targeted. ### `includeArbitraryNames` Type: `Boolean`<br> Default: `false` If `true` and `namedExports` is `true`, generates a named export for not a valid identifier properties of the JSON object by leveraging the ["Arbitrary Module Namespace Identifier Names" feature](https://github.com/tc39/ecma262/pull/2154). ### `indent` Type: `String`<br> Default: `'\t'` Specifies the indentation for the generated default export. ### `namedExports` Type: `Boolean`<br> Default: `true` If `true`, instructs the plugin to generate a named export for every property of the JSON object. ### `preferConst` Type: `Boolean`<br> Default: `false` If `true`, instructs the plugin to declare properties as variables, using either `var` or `const`. This pertains to tree-shaking. ## Meta [CONTRIBUTING](/.github/CONTRIBUTING.md) [LICENSE (MIT)](/LICENSE)
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 3
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
dist
DIR
-
drwxr-xr-x
2026-02-28 00:27:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
types
DIR
-
drwxr-xr-x
2026-02-28 00:27:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
LICENSE
1.12 KB
lrw-r--r--
2026-02-28 00:27:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
package.json
1.95 KB
lrw-r--r--
2026-02-28 00:27:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
README.md
2.94 KB
lrw-r--r--
2026-02-28 00:27:30
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).