{"id":13426139,"url":"https://github.com/rollup/rollup-plugin-json","last_synced_at":"2025-03-15T21:30:42.727Z","repository":{"id":60775159,"uuid":"44875894","full_name":"rollup/rollup-plugin-json","owner":"rollup","description":"This module has moved and is now available at @rollup/plugin-json / https://github.com/rollup/plugins/blob/master/packages/json","archived":true,"fork":false,"pushed_at":"2021-08-04T16:23:12.000Z","size":234,"stargazers_count":126,"open_issues_count":0,"forks_count":19,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-10-28T04:25:23.882Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rollup.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-24T17:04:42.000Z","updated_at":"2024-07-24T09:13:13.000Z","dependencies_parsed_at":"2022-10-04T16:35:57.773Z","dependency_job_id":null,"html_url":"https://github.com/rollup/rollup-plugin-json","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rollup%2Frollup-plugin-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rollup%2Frollup-plugin-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rollup%2Frollup-plugin-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rollup%2Frollup-plugin-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rollup","download_url":"https://codeload.github.com/rollup/rollup-plugin-json/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243792280,"owners_count":20348606,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T00:01:27.271Z","updated_at":"2025-03-15T21:30:42.256Z","avatar_url":"https://github.com/rollup.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Moved\n\nThis module has moved and is now available at [@rollup/plugin-json](https://github.com/rollup/plugins). Please update your dependencies. This repository is no longer maintained.\n\n# rollup-plugin-json\n\nConvert .json files to ES6 modules:\n\n```js\n// import a single property from a JSON file,\n// discarding the rest\nimport { version } from './package.json';\nconsole.log( `running version ${version}` );\n\n// import the whole file as an object\nimport pkg from './package.json';\nconsole.log( `running version ${pkg.version}` );\n```\n\n\n## Installation\n\n```bash\nnpm install --save-dev rollup-plugin-json\n```\n\n\n## Usage\n\n```js\n// rollup.config.js\nimport json from 'rollup-plugin-json';\n\nexport default {\n  input: 'src/main.js',\n  output: {\n    file: 'dist/bundle.js',\n    format: 'iife'\n  },\n\n  plugins: [\n    json({\n      // All JSON files will be parsed by default,\n      // but you can also specifically include/exclude files\n      include: 'node_modules/**',\n      exclude: [ 'node_modules/foo/**', 'node_modules/bar/**' ],\n\n      // for tree-shaking, properties will be declared as\n      // variables, using either `var` or `const`\n      preferConst: true, // Default: false\n\n      // specify indentation for the generated default export —\n      // defaults to '\\t'\n      indent: '  ',\n\n      // ignores indent and generates the smallest code\n      compact: true, // Default: false\n\n      // generate a named export for every property of the JSON object\n      namedExports: true // Default: true\n    })\n  ]\n};\n```\n\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frollup%2Frollup-plugin-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frollup%2Frollup-plugin-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frollup%2Frollup-plugin-json/lists"}