{"_id":"@adonesp/rollup-plugin-image-base64","_rev":"1-a4870d31a0a8c65d309e279237db73fc","name":"@adonesp/rollup-plugin-image-base64","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"@adonesp/rollup-plugin-image-base64","version":"1.0.1","description":"Import JPG, PNG and GIF images as base64 strings","main":"dist/rollup-plugin-image-base64.cjs.js","jsnext:main":"dist/rollup-plugin-image-base64.es.js","module":"dist/rollup-plugin-image-base64.es.js","dependencies":{"rollup-pluginutils":"^1.3.1"},"devDependencies":{"eslint":"^2.11.1","rollup":"^0.26.3","rollup-plugin-buble":"^0.10.0"},"scripts":{"test":"echo \"no tests...\"","pretest":"npm run build:cjs","build":"npm run build:cjs && npm run build:es","build:cjs":"rollup -c -o dist/rollup-plugin-image-base64.cjs.js -f cjs","build:es":"rollup -c -o dist/rollup-plugin-image-base64.es.js -f es6","lint":"eslint src","prepublish":"npm run lint && npm test && npm run build:es"},"repository":{"type":"git","url":"git+https://github.com/zlls/rollup-plugin-image-base64.git"},"keywords":["rollup","modules","images"],"author":{"name":"Sebastian Zilles"},"license":"MIT","bugs":{"url":"https://github.com/zlls/rollup-plugin-image-base64/issues"},"homepage":"https://github.com/zlls/rollup-plugin-image-base64#readme","gitHead":"21f17509d25814222ad5157691e93025dc88c4b7","_id":"@adonesp/rollup-plugin-image-base64@1.0.1","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-9zYDCWxS1s/Q2OjRRzK0GvscC29KMnWKPCq2SKZvHzzxJoknR7xEOusEmvTXJz7XbfzYoLEkv2Tr2NWItMEA3A==","shasum":"4c67f9d265155fbdfead60ee104b3f92678d4539","tarball":"https://registry.npmjs.org/@adonesp/rollup-plugin-image-base64/-/rollup-plugin-image-base64-1.0.1.tgz","fileCount":5,"unpackedSize":3916,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoQ/OCRA9TVsSAnZWagAAEqIQAKGIbGlr6VjHA2Dy1IMo\nZm0r9SJ6vKBXImqX2Y8D9mKIL7RMWQXMLuJW1gFCPY0dVrFdrCOHS5o+yNns\nVDeJNLE4/ZtflDSRauztDGiDSGjMN+u9J4UzMt0P1idHdffLmmvpLBFGGLp4\nedAT9NURms/NYqJu3cU3Z0jA7AXyAnQK/7wW7DFJ97rG7/F8BsXQkzhHB6qM\ntfpd8WetTGVzcdQlXJ+mS+XiNuny7hXWxmGwO1n8SokkJZDlYj/VzsIp6i9B\nQ6qQVnRn4PTkPXGWVuoJv8BgdAa0kMz/nYA6WVBf6PeumOUgS0xYSJ6kiH3N\nnpJRaqy4fygyGIKyEqDTdMWD5uBDmNspEQJ36J97eQmeX7kyN7dWF8g6YA30\njV8iAzwCIjyKd3tuxKROri+0OFot/Vmcv76uB4ymB3JlmNfBtG+oz/039WuE\ncInMEdRiA3BBHEq6LifcYvALzx4Kh6XqrG0Q3ShmNnYwiFvResiZDnr2xHjY\nec3liHpP68zGk+dINcAurL3TAdctqHYjfz7Fsg/n+fTNqAcNSxDwv16BK0wh\n84craKefRqdwhUTJWu++tzCjvwVyNvKJTH2XzjzPWWpxJxQh2DHRveNckCub\neNN2wDSrjWnzWUz5ndQMUqIr+VaTxfeQTThc10JAUOfsveufop8cflZhXEjE\n9zYi\r\n=CVol\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWRjkBJqRsicKm9YoFo3nqXPcWkFGyqna/zaT9f1CYTAIhAKpJlf3o8u7Uwmj7KZEzXFChqjnP6yMliNvffw8AbnX+"}]},"maintainers":[{"name":"adonesp","email":"pitogo.adones@gmail.com"}],"_npmUser":{"name":"adonesp","email":"pitogo.adones@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-image-base64_1.0.1_1570836429406_0.5935014997071497"},"_hasShrinkwrap":false}},"time":{"created":"2019-10-11T23:27:09.200Z","1.0.1":"2019-10-11T23:27:09.510Z","modified":"2022-04-04T11:35:54.801Z"},"maintainers":[{"name":"adonesp","email":"pitogo.adones@gmail.com"}],"description":"Import JPG, PNG and GIF images as base64 strings","homepage":"https://github.com/zlls/rollup-plugin-image-base64#readme","keywords":["rollup","modules","images"],"repository":{"type":"git","url":"git+https://github.com/zlls/rollup-plugin-image-base64.git"},"author":{"name":"Sebastian Zilles"},"bugs":{"url":"https://github.com/zlls/rollup-plugin-image-base64/issues"},"license":"MIT","readme":"# rollup-plugin-image-base64\n\nImport JPG, PNG, GIF and ~~SVG~~ files.\n\nFork of rollup-plugin-image to skip the part in which a `new Image()` is created and just return the base64 as String\n\n## Installation\n\n```bash\nnpm install --save-dev rollup-plugin-image-base64\n```\n\n\n## Usage\n\n```js\n// rollup.config.js\nimport imageBase64 from 'rollup-plugin-image-base64';\n\nexport default {\n  entry: 'src/index.js',\n  dest: 'dist/my-lib.js',\n  plugins: [\n    imageBase64()\n  ]\n};\n```\n\nYou can now use images in your bundle like so:\n\n```js\nimport logo from './rollup.png';\n\nconsole.log(logo); // base64 of image as String\n```\n\nImages are encoded using base64, which means they will be 33% larger than the size on disk. You should therefore only use this for small images where the convenience of having them available on startup (e.g. rendering immediately to a canvas without co-ordinating asynchronous loading of several images) outweighs the cost.\n\n\n## License\n\nMIT\n\nOriginal code by Rich Harris\n","readmeFilename":"README.md"}