{"_id":"@dylanarmstrong/nodepub","_rev":"9-4e10c7316d7ce8f123d35c7bf3eb1399","time":{"created":"2023-06-03T08:52:47.606Z","4.0.0":"2023-06-02T14:38:20.992Z","modified":"2024-02-05T15:01:53.054Z","4.0.1":"2023-06-03T08:52:47.899Z","4.0.2":"2023-06-03T09:23:29.176Z","4.1.0":"2023-06-04T09:50:04.712Z","4.1.1":"2023-06-04T16:27:37.196Z","4.1.2":"2023-06-04T16:36:36.505Z","4.1.4":"2024-02-05T14:21:31.547Z","4.1.5":"2024-02-05T15:01:52.901Z"},"name":"@dylanarmstrong/nodepub","dist-tags":{"latest":"4.1.5"},"versions":{"4.0.1":{"author":{"name":"Dylan Armstrong","email":"dylan@dylan.is"},"bugs":{"url":"https://github.com/dylanarmstrong/nodepub/issues"},"dependencies":{"@dylanarmstrong/eslint-config":"^0.4.0","archiver":"^5.3.1","defaults":"^2.0.1","pug":"^3.0.2"},"description":"Create valid EPUB (v2) ebooks with metadata, contents and cover image.","devDependencies":{"@jest/globals":"^29.5.0","@types/archiver":"^5.3.2","@types/jest":"^29.5.2","@types/node":"^20.2.5","@types/pug":"^2.0.6","@typescript-eslint/eslint-plugin":"^5.59.8","@typescript-eslint/parser":"^5.59.8","eslint":"^8.41.0","eslint-config-prettier":"^8.8.0","eslint-import-resolver-typescript":"^3.5.5","jest":"^29.5.0","prettier":"^2.8.8","ts-jest":"^29.1.0","typescript":"^5.0.4"},"engines":{"node":">16.0.0"},"eslintConfig":{"extends":["@dylanarmstrong","prettier"],"rules":{}},"exports":"./lib/index.js","homepage":"https://github.com/dylanarmstrong/nodepub","keywords":["epub","ebook"],"license":"MIT","name":"@dylanarmstrong/nodepub","prettier":{"singleQuote":true,"trailingComma":"all"},"private":false,"repository":{"type":"git","url":"git+https://github.com/dylanarmstrong/nodepub.git"},"type":"module","version":"4.0.1","scripts":{"build":"tsc","example":"node --trace-uncaught example/example.js","lint":"pnpm run prettier && pnpm run lint-src && pnpm run lint-example && pnpm run lint-test","lint-example":"eslint example/ --fix","lint-src":"eslint src/ --fix","lint-test":"eslint __tests__/ --fix","prettier":"prettier --write --ignore-unknown src/ __tests__/ example/","test":"pnpm run build && node --experimental-vm-modules ./node_modules/jest/bin/jest"},"_id":"@dylanarmstrong/nodepub@4.0.1","_integrity":"sha512-GRYQKjFqjMDUqntEk19OZHOA7zy5PrjtJ8eDmZTG563xCzxTd62uv6Ceq6NQY3vbtafPWqE0DXyJX/jD11Feqg==","_resolved":"/private/var/folders/h6/vtc0rjhn52z2yxvms0wbz_gc0000gn/T/305acaa0c1eaa9f13c3f9fd96940b744/dylanarmstrong-nodepub-4.0.1.tgz","_from":"file:dylanarmstrong-nodepub-4.0.1.tgz","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-GRYQKjFqjMDUqntEk19OZHOA7zy5PrjtJ8eDmZTG563xCzxTd62uv6Ceq6NQY3vbtafPWqE0DXyJX/jD11Feqg==","shasum":"5da418db30751e850212ac87c7154e3aa410af1a","tarball":"https://registry.npmjs.org/@dylanarmstrong/nodepub/-/nodepub-4.0.1.tgz","fileCount":20,"unpackedSize":29194,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGcYlkMuJoyaBddOrNVVyWFxbi++KHCWVy3sC/7DmrdsAiEAn1rLey0uyQ7LhtypnAtqg4r0H5T4HV2Kj4I6Z10B8GY="}]},"_npmUser":{"name":"dylanarmstrong","email":"dylan@dylan.is"},"directories":{},"maintainers":[{"name":"dylanarmstrong","email":"dylan@dylan.is"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nodepub_4.0.1_1685782367673_0.08191807278124386"},"_hasShrinkwrap":false},"4.0.2":{"author":{"name":"Dylan Armstrong","email":"dylan@dylan.is"},"bugs":{"url":"https://github.com/dylanarmstrong/nodepub/issues"},"dependencies":{"@dylanarmstrong/eslint-config":"^0.4.0","archiver":"^5.3.1","defaults":"^2.0.1","pug":"^3.0.2"},"description":"Create valid EPUB (v2) ebooks with metadata, contents and cover image.","devDependencies":{"@jest/globals":"^29.5.0","@types/archiver":"^5.3.2","@types/jest":"^29.5.2","@types/node":"^20.2.5","@types/pug":"^2.0.6","@typescript-eslint/eslint-plugin":"^5.59.8","@typescript-eslint/parser":"^5.59.8","eslint":"^8.41.0","eslint-config-prettier":"^8.8.0","eslint-import-resolver-typescript":"^3.5.5","jest":"^29.5.0","prettier":"^2.8.8","ts-jest":"^29.1.0","typescript":"^5.0.4"},"engines":{"node":">16.0.0"},"eslintConfig":{"extends":["@dylanarmstrong","prettier"],"rules":{}},"exports":"./lib/index.js","homepage":"https://github.com/dylanarmstrong/nodepub","keywords":["epub","ebook"],"license":"MIT","name":"@dylanarmstrong/nodepub","prettier":{"singleQuote":true,"trailingComma":"all"},"private":false,"repository":{"type":"git","url":"git+https://github.com/dylanarmstrong/nodepub.git"},"type":"module","version":"4.0.2","scripts":{"build":"tsc","example":"node --trace-uncaught example/example.js","lint":"pnpm run prettier && pnpm run lint-src && pnpm run lint-example && pnpm run lint-test","lint-example":"eslint example/ --fix","lint-src":"eslint src/ --fix","lint-test":"eslint __tests__/ --fix","prettier":"prettier --write --ignore-unknown src/ __tests__/ example/","test":"pnpm run build && node --experimental-vm-modules ./node_modules/jest/bin/jest"},"_id":"@dylanarmstrong/nodepub@4.0.2","_integrity":"sha512-ktzqxABACuvgLg7VuoafjIGaGwj0Ky5mRw5GUrNORxaw53YHLy9yhhI5JFDBe8188wfe80sjSWWqrHJlIsQsBQ==","_resolved":"/private/var/folders/h6/vtc0rjhn52z2yxvms0wbz_gc0000gn/T/bbfbc4afcd4bcd43391e639399a8bf2a/dylanarmstrong-nodepub-4.0.2.tgz","_from":"file:dylanarmstrong-nodepub-4.0.2.tgz","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-ktzqxABACuvgLg7VuoafjIGaGwj0Ky5mRw5GUrNORxaw53YHLy9yhhI5JFDBe8188wfe80sjSWWqrHJlIsQsBQ==","shasum":"4439b44c391bcded38dd6769cbfa95266ba3e788","tarball":"https://registry.npmjs.org/@dylanarmstrong/nodepub/-/nodepub-4.0.2.tgz","fileCount":20,"unpackedSize":29215,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsCamLuz/0bB9d/Eg8deQ9AyrvXbJ+RFYvJY3jmjTS6wIhAOU9XXg6TES1nBuow92dntde9Qiu5o5ksckKljv1BeFo"}]},"_npmUser":{"name":"dylanarmstrong","email":"dylan@dylan.is"},"directories":{},"maintainers":[{"name":"dylanarmstrong","email":"dylan@dylan.is"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nodepub_4.0.2_1685784208992_0.6143583262384196"},"_hasShrinkwrap":false},"4.1.0":{"author":{"name":"Dylan Armstrong","email":"dylan@dylan.is"},"bugs":{"url":"https://github.com/dylanarmstrong/nodepub/issues"},"dependencies":{"@dylanarmstrong/eslint-config":"^0.4.0","archiver":"^5.3.1","defaults":"^2.0.1","mime":"^3.0.0","pug":"^3.0.2","uuid":"^9.0.0"},"description":"Create valid EPUB (v2) ebooks with metadata, contents and cover image.","devDependencies":{"@jest/globals":"^29.5.0","@types/archiver":"^5.3.2","@types/jest":"^29.5.2","@types/mime":"^3.0.1","@types/node":"^20.2.5","@types/pug":"^2.0.6","@types/uuid":"^9.0.1","@typescript-eslint/eslint-plugin":"^5.59.8","@typescript-eslint/parser":"^5.59.8","eslint":"^8.42.0","eslint-config-prettier":"^8.8.0","eslint-import-resolver-typescript":"^3.5.5","jest":"^29.5.0","prettier":"^2.8.8","ts-jest":"^29.1.0","typescript":"^5.1.3"},"engines":{"node":">16.0.0"},"eslintConfig":{"extends":["@dylanarmstrong","prettier"],"rules":{}},"exports":"./lib/index.js","homepage":"https://github.com/dylanarmstrong/nodepub","keywords":["epub","ebook"],"license":"MIT","name":"@dylanarmstrong/nodepub","prettier":{"singleQuote":true,"trailingComma":"all"},"private":false,"repository":{"type":"git","url":"git+https://github.com/dylanarmstrong/nodepub.git"},"type":"module","version":"4.1.0","scripts":{"build":"tsc","example":"pnpm run build && pnpm run example:build && node --trace-uncaught example/example.js","example:build":"tsc -p tsconfig.example.json","lint":"pnpm run prettier && pnpm run lint:src && pnpm run lint:example && pnpm run lint:test","lint:example":"eslint example/example.ts --fix","lint:src":"eslint src/ --fix","lint:test":"eslint __tests__/ --fix","prettier":"prettier --write --ignore-unknown src/ __tests__/ example/example.ts","test":"pnpm run build && node --experimental-vm-modules ./node_modules/jest/bin/jest"},"_id":"@dylanarmstrong/nodepub@4.1.0","_integrity":"sha512-E3RqJ4AKWNWs0XaCSneQktob9poH5dSYiaImiHeT5e5kZ738EXe7MEK+REr3Hcctnkuk0G0ckeZYbhjjIfY8XA==","_resolved":"/private/var/folders/h6/vtc0rjhn52z2yxvms0wbz_gc0000gn/T/4d89cfe3d2b2f38470b0142f6e0b2271/dylanarmstrong-nodepub-4.1.0.tgz","_from":"file:dylanarmstrong-nodepub-4.1.0.tgz","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-E3RqJ4AKWNWs0XaCSneQktob9poH5dSYiaImiHeT5e5kZ738EXe7MEK+REr3Hcctnkuk0G0ckeZYbhjjIfY8XA==","shasum":"3b780169ea73fc434596c686f7393cd00d4df682","tarball":"https://registry.npmjs.org/@dylanarmstrong/nodepub/-/nodepub-4.1.0.tgz","fileCount":20,"unpackedSize":29291,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0VJTUkjZVl00WjmlgNrpg14lxlAGcht5a4XyBUIfN5gIgEiDngC4Cxzv7vS0Ae5fCxPpMNuVoTmE1PBuvTMGzNcY="}]},"_npmUser":{"name":"dylanarmstrong","email":"dylan@dylan.is"},"directories":{},"maintainers":[{"name":"dylanarmstrong","email":"dylan@dylan.is"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nodepub_4.1.0_1685872204477_0.784835466668311"},"_hasShrinkwrap":false},"4.1.1":{"author":{"name":"Dylan Armstrong","email":"dylan@dylan.is"},"bugs":{"url":"https://github.com/dylanarmstrong/nodepub/issues"},"dependencies":{"@dylanarmstrong/eslint-config":"^0.4.0","@dylanarmstrong/tsconfig":"^0.0.1","archiver":"^5.3.1","defaults":"^2.0.1","mime":"^3.0.0","pug":"^3.0.2","uuid":"^9.0.0"},"description":"Create valid EPUB (v2) ebooks with metadata, contents and cover image.","devDependencies":{"@jest/globals":"^29.5.0","@types/archiver":"^5.3.2","@types/jest":"^29.5.2","@types/mime":"^3.0.1","@types/node":"^20.2.5","@types/pug":"^2.0.6","@types/uuid":"^9.0.1","@typescript-eslint/eslint-plugin":"^5.59.8","@typescript-eslint/parser":"^5.59.8","eslint":"^8.42.0","eslint-config-prettier":"^8.8.0","eslint-import-resolver-typescript":"^3.5.5","jest":"^29.5.0","prettier":"^2.8.8","ts-jest":"^29.1.0","typescript":"^5.1.3"},"engines":{"node":">16.0.0"},"eslintConfig":{"extends":["@dylanarmstrong","prettier"],"rules":{}},"exports":"./lib/index.js","homepage":"https://github.com/dylanarmstrong/nodepub","keywords":["epub","ebook"],"license":"MIT","name":"@dylanarmstrong/nodepub","prettier":{"singleQuote":true,"trailingComma":"all"},"private":false,"repository":{"type":"git","url":"git+https://github.com/dylanarmstrong/nodepub.git"},"type":"module","version":"4.1.1","scripts":{"build":"tsc","example":"pnpm run build && pnpm run example:build && node --trace-uncaught example/example.js","example:build":"tsc -p tsconfig.example.json","lint":"pnpm run prettier && pnpm run lint:src && pnpm run lint:example && pnpm run lint:test","lint:example":"eslint example/example.ts --fix","lint:src":"eslint src/ --fix","lint:test":"eslint __tests__/ --fix","prettier":"prettier --write --ignore-unknown src/ __tests__/ example/example.ts","test":"pnpm run build && node --experimental-vm-modules ./node_modules/jest/bin/jest"},"_id":"@dylanarmstrong/nodepub@4.1.1","_integrity":"sha512-wTSPo8rwCOj58HWxN7B5KOzL3qCt/Oc3Psa/olQc2K3ErePFUO9yWfscCLoRTOcdNoMf4V//qxGgp0N2i37zEg==","_resolved":"/private/var/folders/h6/vtc0rjhn52z2yxvms0wbz_gc0000gn/T/f80375ff4f9a45afea98cd7c825a2fff/dylanarmstrong-nodepub-4.1.1.tgz","_from":"file:dylanarmstrong-nodepub-4.1.1.tgz","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-wTSPo8rwCOj58HWxN7B5KOzL3qCt/Oc3Psa/olQc2K3ErePFUO9yWfscCLoRTOcdNoMf4V//qxGgp0N2i37zEg==","shasum":"97ae0b7035174cc9a7f21c6e585bdcc5465e4f98","tarball":"https://registry.npmjs.org/@dylanarmstrong/nodepub/-/nodepub-4.1.1.tgz","fileCount":14,"unpackedSize":24375,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICg7WIcIkDX2ejUFjalhclU8WCafWCqx+owC5x7g8+IQAiEA1C28qfEiwJ6maMDobnUjmozEs4icTtJWRmjSk0lfAlw="}]},"_npmUser":{"name":"dylanarmstrong","email":"dylan@dylan.is"},"directories":{},"maintainers":[{"name":"dylanarmstrong","email":"dylan@dylan.is"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nodepub_4.1.1_1685896056940_0.6823680981700788"},"_hasShrinkwrap":false},"4.1.2":{"author":{"name":"Dylan Armstrong","email":"dylan@dylan.is"},"bugs":{"url":"https://github.com/dylanarmstrong/nodepub/issues"},"dependencies":{"@dylanarmstrong/eslint-config":"^0.4.0","@dylanarmstrong/tsconfig":"^0.0.2","archiver":"^5.3.1","defaults":"^2.0.1","mime":"^3.0.0","pug":"^3.0.2","uuid":"^9.0.0"},"description":"Create valid EPUB (v2) ebooks with metadata, contents and cover image.","devDependencies":{"@jest/globals":"^29.5.0","@types/archiver":"^5.3.2","@types/jest":"^29.5.2","@types/mime":"^3.0.1","@types/node":"^20.2.5","@types/pug":"^2.0.6","@types/uuid":"^9.0.1","@typescript-eslint/eslint-plugin":"^5.59.8","@typescript-eslint/parser":"^5.59.8","eslint":"^8.42.0","eslint-config-prettier":"^8.8.0","eslint-import-resolver-typescript":"^3.5.5","jest":"^29.5.0","prettier":"^2.8.8","ts-jest":"^29.1.0","typescript":"^5.1.3"},"engines":{"node":">16.0.0"},"eslintConfig":{"extends":["@dylanarmstrong","prettier"],"rules":{}},"exports":"./lib/index.js","homepage":"https://github.com/dylanarmstrong/nodepub","keywords":["epub","ebook"],"license":"MIT","name":"@dylanarmstrong/nodepub","prettier":{"singleQuote":true,"trailingComma":"all"},"private":false,"repository":{"type":"git","url":"git+https://github.com/dylanarmstrong/nodepub.git"},"type":"module","version":"4.1.2","scripts":{"build":"tsc","example":"pnpm run build && pnpm run example:build && node --trace-uncaught example/example.js","example:build":"tsc -p tsconfig.example.json","lint":"pnpm run prettier && pnpm run lint:src && pnpm run lint:example && pnpm run lint:test","lint:example":"eslint example/example.ts --fix","lint:src":"eslint src/ --fix","lint:test":"eslint __tests__/ --fix","prettier":"prettier --write --ignore-unknown src/ __tests__/ example/example.ts","test":"pnpm run build && node --experimental-vm-modules ./node_modules/jest/bin/jest"},"_id":"@dylanarmstrong/nodepub@4.1.2","_integrity":"sha512-OR7I1+GlX1hxwp4DdOjiU9v4tQcT0xqTolfhkDr01Xs8Nu5PECXvmh1nJj5LVbWpuhvxbjzbtyL8rfquejq5Yw==","_resolved":"/private/var/folders/h6/vtc0rjhn52z2yxvms0wbz_gc0000gn/T/dc0e230552846dec9b6361d9c929034b/dylanarmstrong-nodepub-4.1.2.tgz","_from":"file:dylanarmstrong-nodepub-4.1.2.tgz","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-OR7I1+GlX1hxwp4DdOjiU9v4tQcT0xqTolfhkDr01Xs8Nu5PECXvmh1nJj5LVbWpuhvxbjzbtyL8rfquejq5Yw==","shasum":"d6e45d565c5100b5256433b4a79c4eb054966a03","tarball":"https://registry.npmjs.org/@dylanarmstrong/nodepub/-/nodepub-4.1.2.tgz","fileCount":20,"unpackedSize":27461,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGIU0KWJe/rHs+5HQc57U8OcLKWc8wqEZSlaGX/nPkBOAiEA2YCoRXDTHgyn0laG1oPDjBu11UmBHMyGSypb1LJ0OBg="}]},"_npmUser":{"name":"dylanarmstrong","email":"dylan@dylan.is"},"directories":{},"maintainers":[{"name":"dylanarmstrong","email":"dylan@dylan.is"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nodepub_4.1.2_1685896596306_0.5067987364084443"},"_hasShrinkwrap":false},"4.1.4":{"author":{"name":"Dylan Armstrong","email":"dylan@dylan.is"},"bugs":{"url":"https://github.com/dylanarmstrong/nodepub/issues"},"dependencies":{"archiver":"^6.0.1","defaults":"^3.0.0","mime":"^3.0.0","pug":"^3.0.2","uuid":"^9.0.1"},"description":"Create valid EPUB (v2) ebooks with metadata, contents and cover image.","devDependencies":{"@dylanarmstrong/eslint-config":"^0.5.4","@dylanarmstrong/tsconfig":"^0.0.2","@jest/globals":"^29.7.0","@types/archiver":"^5.3.4","@types/jest":"^29.5.12","@types/mime":"^3.0.4","@types/node":"^20.11.16","@types/pug":"^2.0.10","@types/uuid":"^9.0.8","@typescript-eslint/eslint-plugin":"^5.62.0","@typescript-eslint/parser":"^5.62.0","eslint":"^8.56.0","eslint-config-prettier":"^8.10.0","eslint-import-resolver-typescript":"^3.6.1","jest":"^29.7.0","prettier":"^2.8.8","ts-jest":"^29.1.2","typescript":"^5.3.3"},"engines":{"node":">16.0.0"},"eslintConfig":{"extends":"@dylanarmstrong"},"exports":"./lib/index.js","homepage":"https://github.com/dylanarmstrong/nodepub","keywords":["epub","ebook"],"license":"MIT","name":"@dylanarmstrong/nodepub","prettier":{"singleQuote":true,"trailingComma":"all"},"private":false,"repository":{"type":"git","url":"git+https://github.com/dylanarmstrong/nodepub.git"},"scripts":{"build":"tsc","example":"pnpm run build && pnpm run example:build && node --trace-uncaught example/example.js","example:build":"tsc -p tsconfig.example.json","lint":"pnpm run prettier && pnpm run lint:src && pnpm run lint:example && pnpm run lint:test","lint:example":"eslint example/example.ts --fix","lint:src":"eslint src/ --fix","lint:test":"eslint __tests__/ --fix","prettier":"prettier --write --ignore-unknown src/ __tests__/ example/example.ts","test":"node --experimental-vm-modules ./node_modules/jest/bin/jest.js"},"type":"module","version":"4.1.4","_id":"@dylanarmstrong/nodepub@4.1.4","gitHead":"2b7291bbfd8c1386f4c59aa9da7f8d32af87ca9a","_nodeVersion":"20.11.0","_npmVersion":"10.4.0","dist":{"integrity":"sha512-MDx7DVnqfjnfqBcJdy7tV1OwanioR3ayjRtkgEBNsJveg0R7KM9L10e+ONo7HyPA2e/bSAJZdJe9dn4ot4kQ5w==","shasum":"ada13baabdc67a948ba1b251848712b437d18050","tarball":"https://registry.npmjs.org/@dylanarmstrong/nodepub/-/nodepub-4.1.4.tgz","fileCount":20,"unpackedSize":27403,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6hgyp8B4amWhXB8+gIhWaynDhCKlckLhqPsxQLr8flgIhAPnEX1fc6zScOgvndHfcO7N5Ea5w5pKJ43EiyQGwSQs3"}]},"_npmUser":{"name":"dylanarmstrong","email":"dylan@dylan.is"},"directories":{},"maintainers":[{"name":"dylanarmstrong","email":"dylan@dylan.is"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nodepub_4.1.4_1707142891394_0.4804295007900379"},"_hasShrinkwrap":false},"4.1.5":{"author":{"name":"Dylan Armstrong","email":"dylan@dylan.is"},"bugs":{"url":"https://github.com/dylanarmstrong/nodepub/issues"},"dependencies":{"archiver":"^6.0.1","defaults":"^3.0.0","mime":"^3.0.0","pug":"^3.0.2","uuid":"^9.0.1"},"description":"Create valid EPUB (v2) ebooks with metadata, contents and cover image.","devDependencies":{"@dylanarmstrong/eslint-config":"^0.5.4","@dylanarmstrong/tsconfig":"^0.0.2","@jest/globals":"^29.7.0","@types/archiver":"^5.3.4","@types/jest":"^29.5.12","@types/mime":"^3.0.4","@types/node":"^20.11.16","@types/pug":"^2.0.10","@types/uuid":"^9.0.8","@typescript-eslint/eslint-plugin":"^5.62.0","@typescript-eslint/parser":"^5.62.0","eslint":"^8.56.0","eslint-config-prettier":"^8.10.0","eslint-import-resolver-typescript":"^3.6.1","jest":"^29.7.0","prettier":"^2.8.8","ts-jest":"^29.1.2","typescript":"^5.3.3"},"engines":{"node":">=18.0.0"},"eslintConfig":{"extends":"@dylanarmstrong"},"exports":"./lib/index.js","homepage":"https://github.com/dylanarmstrong/nodepub","keywords":["epub","ebook"],"license":"MIT","name":"@dylanarmstrong/nodepub","prettier":{"singleQuote":true,"trailingComma":"all"},"private":false,"repository":{"type":"git","url":"git+https://github.com/dylanarmstrong/nodepub.git"},"scripts":{"build":"tsc","example":"pnpm run build && pnpm run example:build && node --trace-uncaught example/example.js","example:build":"tsc -p tsconfig.example.json","lint":"pnpm run prettier && pnpm run lint:src && pnpm run lint:example && pnpm run lint:test","lint:example":"eslint example/example.ts --fix","lint:src":"eslint src/ --fix","lint:test":"eslint __tests__/ --fix","prettier":"prettier --write --ignore-unknown src/ __tests__/ example/example.ts","test":"node --experimental-vm-modules ./node_modules/jest/bin/jest.js"},"type":"module","version":"4.1.5","_id":"@dylanarmstrong/nodepub@4.1.5","gitHead":"cfa49742d3c0bb781239033a6a074a368e1b610e","_nodeVersion":"20.11.0","_npmVersion":"10.4.0","dist":{"integrity":"sha512-Kl8BW1uoh3jEMOnAbrXLz5QNua2NLm8OZOGJgPMkeZM/JIgfKI+rFpNz/uKuOowab6zyLuOUO2aDuE0W+9qEfA==","shasum":"b2a92fd016eaf525ec697ef7954c1189868cb2a9","tarball":"https://registry.npmjs.org/@dylanarmstrong/nodepub/-/nodepub-4.1.5.tgz","fileCount":20,"unpackedSize":27755,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCQecddc86NJ0pIYXqRLhfAAQzEd1ur2AbWA1O26C1KgIgX8WzZc5uKeQJk5Kebwc9IGW1rjp5AGZNS+WcSB7GyCU="}]},"_npmUser":{"name":"dylanarmstrong","email":"dylan@dylan.is"},"directories":{},"maintainers":[{"name":"dylanarmstrong","email":"dylan@dylan.is"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nodepub_4.1.5_1707145312724_0.6879560333110843"},"_hasShrinkwrap":false}},"maintainers":[{"name":"dylanarmstrong","email":"dylan@dylan.is"}],"description":"Create valid EPUB (v2) ebooks with metadata, contents and cover image.","homepage":"https://github.com/dylanarmstrong/nodepub","keywords":["epub","ebook"],"repository":{"type":"git","url":"git+https://github.com/dylanarmstrong/nodepub.git"},"author":{"name":"Dylan Armstrong","email":"dylan@dylan.is"},"bugs":{"url":"https://github.com/dylanarmstrong/nodepub/issues"},"license":"MIT","readme":"![IDPF](https://img.shields.io/badge/idpf-valid-success)\n\n# Nodepub\n\nCreate valid Epub 3.3 ebooks with metadata, contents, cover, and images.\n\n*This is a utility module, not a user-facing one. In other words it is assumed that the caller has already validated the inputs. Only basic sanity checks are performed.*\n\n## Contents\n\n- [About Nodepub](#about-nodepub)\n- [Installation](#installation)\n- [Creating an Epub](#creating-an-epub)\n  - [Setting the Metadata](#setting-the-metadata)\n    - [Example Metadata](#example-metadata)\n  - [Adding Contents](#adding-contents)\n  - [Including Images](#including-images)\n  - [Changing the Styling](#changing-the-styling)\n  - [Custom Table of Contents](#custom-table-of-contents)\n  - [Generating Output](#generating-output)\n- [A Full Example](#a-full-example)\n- [Changelog](#changelog)\n- [Previous Work](#previous-work)\n\n## About Nodepub\n\nNodepub is a **Node** module which can be used to create **Epub 3** documents.\n\n- Files pass validation via [epubcheck](https://github.com/w3c/epubcheck)\n- Files open fine in iBooks and Calibre\n- PNG/JPEG cover images (or text)\n- Inline resources within the Epub\n  - See [Including Resources](#including-resources) for supported formats\n- Custom CSS can be provided\n- Front matter before the contents page\n- Exclude sections from auto contents page and metadata-based navigation\n- OPS and other 'expected' subfolders within the Epub\n\nDevelopment is done against Node v16.20.0 since v4.0.0 (June 2023).\n*Node v16.0 or later* should work fine.\n\n## About @dylanarmstrong/nodepub\n\nThis is a continuation of the work by [kartlidge](https://github.com/kcartlidge/nodepub)\nand is a complete rewrite targeting Epub v3.3.\n\n## Installation\n\nIt's an [npm package](https://www.npmjs.com/package/@dylanarmstrong/nodepub).\nTo install it:\n\n``` sh\nnpm install @dylanarmstrong/nodepub\n# or\npnpm add @dylanarmstrong/nodepub\n```\n\nThen import it for use:\n\n``` javascript\nimport Epub from '@dylanarmstrong/nodepub';\n```\n\n## Creating an Epub\n\n- Documents consist of *metadata*, *sections*, *resources*, *css*, and *options*\n  - `metadata` is provided in the form of an object with various properties detailing the book\n  - `sections` are chunks of HTML where each represent a chapter, front/back matter, or similar\n  - `resources` are inlined image / mp3 files that can appear within the body of the Epub\n    - The cover is a special resource which is declared within the metadata\n  - `css` is for appending to the book `css`\n  - `options` are for general options that control some formatting of the book\n\n``` javascript\nconst metadata = {\n  author: 'Dylan',\n  contents: 'Chapters',\n  copyright: 'Dylan, 2023',\n  cover: 'example/cover.png',\n  description: 'A test book.',\n  fileAs: 'Dylan',\n  genre: 'Non-Fiction',\n  id: '1234',\n  language: 'en',\n  published: '1992-06-17',\n  publisher: 'My Fake Publisher',\n  sequence: 1,\n  series: 'My Series',\n  source: 'https://dylan.is',\n  tags: ['Sample', 'Example', 'Test'],\n  title: 'My First Book',\n};\n\nconst resources = [{\n  data: await readFile('../example/hat.png'),\n  name: '../example/hat.png',\n}];\n\nconst sections = [\n  {\n    content: 'This is a libre book with no copyright',\n    excludeFromContents: true,\n    filename: 'copyright-page',\n    isFrontMatter: true,\n    title: 'Copyright',\n  },\n  {\n    content: 'Chapter 1',\n    title: '<h1>Chapter One</h1><p>...</p>',\n  },\n  {\n    content: 'Chapter 2',\n    title: '<h1>Chapter Two</h1><p>...</p>',\n  },\n];\n\nconst css = `\n  table {\n    border: 3px double #ccc;\n    margin-left: auto;\n    margin-right: auto;\n    padding: 0.5em;\n  }\n`;\n\nconst options = {\n  showContents: true,\n  coverType: 'image', // Possible types are 'image' and 'text'\n};\n\nconst epub = new Epub({\n  metadata,\n  sections,\n  // Optional\n  css,\n  options,\n  resources,\n});\n```\n\n### Regarding Metadata\n\n- `cover` should be the filename of an image - recommendation is 600x800, 600x900, or similar\n- `fileAs` is the sortable version of the `author`, which is usually by last name\n- `genre` becomes the main subject in the final Epub\n- `language` is the short *ISO* language name (`en`, `fr`, `de` etc)\n- `published` is the data published - note the *year-month-day* format\n- `series` and `sequence` are not recognised by many readers (it sets the properties used by *Calibre*)\n- `showContents` (default is `true`) lets you suppress the contents page\n- `tags` also become subjects in the final Epub\n\n### Regarding Sections\n\n| PARAMETER           | PURPOSE                          | DEFAULT |\n| ------------------- | -------------------------------- | ------- |\n| title (required)    | Table of contents entry text     |         |\n| content (required)  | HTML body text                   |         |\n| excludeFromContents | Hide from contents/navigation    | `false` |\n| isFrontMatter       | Place before the contents page   | `false` |\n| overrideFilename    | Section filename inside the Epub |         |\n\n### Including Resources\n\nResources include images and mp3s.\n\nIn the example above:\n\n``` javascript\nconst resources = [{\n  data: await readFile('../example/hat.png'),\n  name: '../example/hat.png',\n}];\n```\n\nThis part of the metadata is an array of objects which provide a data buffer and the name of the file.\n\nThese resources are automatically added into the Epub when it is generated. They always go in an `resources` folder internally. As they all go into the same folder they *should have unique filenames*. Duplicates are removed.\n\nTo include the resources in your content the HTML should refer to this internal folder rather than the original source folder, so for example `<img src=\"../resources/hat.png\" />` in the above example.\n\n### Changing the Styling\n\nYou can inject basic CSS into your book. This allows you to override the basic styling to change how it looks.\nYou should use this sparingly - there is inconsistent CSS support across ereader devices/software.\n\nModify the `css` parameter of `createEpub`.\n\n```javascript\nconst css = `p { text-indent: 0; } p+p { text-indent: 0.75em; }`);\nconst epub = new Epub({\n  css,\n  resources,\n  metadata,\n  sections,\n});\n```\n\n### Advanced Options\n\nYou can also modify the book with advanced options.\n\n| PARAMETER           | PURPOSE                           | DEFAULT   |\n| ------------------- | --------------------------------- | --------- |\n| showContents        | Whether or not to include the TOC | `true`    |\n| coverType           | Is the cover 'image' or 'text'?   | `'image'` |\n\n```javascript\nconst options = {\n  showContents: true, // Whether or not to include the TOC page (default: true)\n  coverType: 'image', // Possible types are 'image' and 'text'  (default: 'image')\n};\n\nconst epub = createEpub({\n  metadata,\n  options,\n  sections,\n});\n```\n\n### Generating Output\n\nHaving defined your document generating an Epub is as simple as:\n\n``` javascript\nawait epub.write(folder, filename);\n```\n\n## A Full Example\n\nIn the top folder (the one containing the `package.json` file) run the following:\n\n``` javascript\npnpm run example\n```\n\nThis runs in [the `example` folder](./example) using the code in [`example/example.js`](./example/example.js) to generate a final Epub.\n\n## Changelog\n\n- [You can view the change log here.](./CHANGELOG.md)\n\n## Previous Work & Credits\n\n* [Original](https://github.com/kcartlidge/nodepub)\n* [Original Fork with Pug Templates](https://github.com/fholzer/nodepub).\n* [Nodepub3 with MP3](https://gitee.com/taolt/nodepub3/tree/master)\n","readmeFilename":"README.md"}