معرفی شرکت ها


@rollup/plugin-json-6.0.0


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Convert .json files to ES6 modules
ویژگی مقدار
سیستم عامل -
نام فایل @rollup/plugin-json-6.0.0
نام @rollup/plugin-json
نسخه کتابخانه 6.0.0
نگهدارنده ['shellscape', 'rich_harris', 'guybedford', 'lukastaegert']
ایمیل نگهدارنده ['andrew@shellscape.org', 'richard.a.harris@gmail.com', 'guybedford@gmail.com', 'lukas.taegert@tngtech.com']
نویسنده rollup
ایمیل نویسنده -
آدرس صفحه اصلی git+https://github.com/rollup/plugins.git
آدرس اینترنتی https://github.com/rollup/plugins/tree/master/packages/json#readme
مجوز MIT
[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] [![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](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. ### `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)


نیازمندی

مقدار نام
^5.0.1 @rollup/pluginutils


زبان مورد نیاز

مقدار نام
18.12.1 Npm


نحوه نصب


نصب پکیج tgz @rollup/plugin-json-6.0.0:

    npm install @rollup/plugin-json-6.0.0.tgz