Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@miyaneee/rollup-plugin-json5
Advanced tools
🍣 A Rollup plugin which Converts .json5 files to ES6 modules. This plugin is very similar to json plugin officially provided beside the parser.
简体中文 | English
This plugin requires an LTS Node version (v8.0.0+) and Rollup v1.20.0+.
Using npm:
npm install @miyaneee/rollup-plugin-json5 -D
Or use yarn:
yarn add @miyaneee/rollup-plugin-json5 -D
Create a rollup.config.js
configuration file and import the plugin:
import json5 from '@miyaneee/rollup-plugin-json5'
export default {
input: 'src/index.js',
output: {
dir: 'output',
format: 'cjs'
},
plugins: [json5()]
}
Then call rollup
either via the CLI or the API.
Now .json5
file will be importable:
import json from 'path/to/json5.json5'
console.log(json)
compact
Type: Boolean
Default: false
If true
, instructs the plugin to ignore indent
and generates the smallest code.
exclude
Type: String
| Array[...String]
Default: null
A minimatch pattern, 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]
Default: null
A minimatch pattern, 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
Default: '\t'
Specifies the indentation for the generated default export.
namedExports
Type: Boolean
Default: true
If true
, instructs the plugin to generate a named export for every property of the JSON object.
preferConst
Type: Boolean
Default: false
If true
, instructs the plugin to declare properties as variables, using either var
or const
. This pertains to tree-shaking.
MIT
1.0.0 - 2021-11-18
FAQs
🍣 A Rollup plugin which Converts .json5 files to ES6 modules.
We found that @miyaneee/rollup-plugin-json5 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.