├── .eslintignore ├── .eslintrc ├── .gitignore ├── .huskyrc ├── .lintstagedrc ├── .prettierrc ├── .travis.yml ├── CHANGELOG.md ├── README.md ├── index.d.ts ├── package.json ├── rollup.config.js ├── src └── index.js ├── test ├── samples │ ├── array │ │ ├── config.json │ │ └── main.js │ ├── basic │ │ ├── config.json │ │ └── main.js │ ├── extensionless │ │ ├── config.json │ │ ├── dir │ │ │ └── index.json │ │ └── main.js │ ├── form │ │ ├── compact.js │ │ ├── customIndent.js │ │ ├── default.js │ │ ├── input.json │ │ ├── namedExports.js │ │ └── preferConst.js │ ├── garbage │ │ ├── bad.json │ │ └── main.js │ ├── literal │ │ ├── config.json │ │ └── main.js │ ├── named │ │ ├── main.js │ │ └── package.json │ └── no-valid-keys │ │ ├── main.js │ │ └── mime-db.json └── test.js ├── tsconfig.json └── typings-test.js /.eslintignore: -------------------------------------------------------------------------------- 1 | test/samples -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/.eslintrc -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | dist 4 | .gobble* 5 | -------------------------------------------------------------------------------- /.huskyrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/.huskyrc -------------------------------------------------------------------------------- /.lintstagedrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/.lintstagedrc -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/.prettierrc -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/.travis.yml -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/README.md -------------------------------------------------------------------------------- /index.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/index.d.ts -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/package.json -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/rollup.config.js -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/src/index.js -------------------------------------------------------------------------------- /test/samples/array/config.json: -------------------------------------------------------------------------------- 1 | [ 2 | 1, 2, 3 3 | ] 4 | -------------------------------------------------------------------------------- /test/samples/array/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/test/samples/array/main.js -------------------------------------------------------------------------------- /test/samples/basic/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "answer": 42 3 | } 4 | -------------------------------------------------------------------------------- /test/samples/basic/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/test/samples/basic/main.js -------------------------------------------------------------------------------- /test/samples/extensionless/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "answer": 42 3 | } 4 | -------------------------------------------------------------------------------- /test/samples/extensionless/dir/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "Are extensionless imports and /index resolutions a good idea?": "No." 3 | } 4 | -------------------------------------------------------------------------------- /test/samples/extensionless/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/test/samples/extensionless/main.js -------------------------------------------------------------------------------- /test/samples/form/compact.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/test/samples/form/compact.js -------------------------------------------------------------------------------- /test/samples/form/customIndent.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/test/samples/form/customIndent.js -------------------------------------------------------------------------------- /test/samples/form/default.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/test/samples/form/default.js -------------------------------------------------------------------------------- /test/samples/form/input.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/test/samples/form/input.json -------------------------------------------------------------------------------- /test/samples/form/namedExports.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/test/samples/form/namedExports.js -------------------------------------------------------------------------------- /test/samples/form/preferConst.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/test/samples/form/preferConst.js -------------------------------------------------------------------------------- /test/samples/garbage/bad.json: -------------------------------------------------------------------------------- 1 | not json -------------------------------------------------------------------------------- /test/samples/garbage/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/test/samples/garbage/main.js -------------------------------------------------------------------------------- /test/samples/literal/config.json: -------------------------------------------------------------------------------- 1 | true 2 | -------------------------------------------------------------------------------- /test/samples/literal/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/test/samples/literal/main.js -------------------------------------------------------------------------------- /test/samples/named/main.js: -------------------------------------------------------------------------------- 1 | export { version } from './package.json'; 2 | -------------------------------------------------------------------------------- /test/samples/named/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/test/samples/named/package.json -------------------------------------------------------------------------------- /test/samples/no-valid-keys/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/test/samples/no-valid-keys/main.js -------------------------------------------------------------------------------- /test/samples/no-valid-keys/mime-db.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/test/samples/no-valid-keys/mime-db.json -------------------------------------------------------------------------------- /test/test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/test/test.js -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/tsconfig.json -------------------------------------------------------------------------------- /typings-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-json/HEAD/typings-test.js --------------------------------------------------------------------------------