Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Improve file selector not to include unnecessary files into Webpub/EPUB #464

Merged
merged 5 commits into from
Jan 20, 2024

Conversation

spring-raining
Copy link
Member

fix #461

@MurakamiShinyu
Copy link
Member

#461 のテストなどで試して、themesのexampleとnode_modulesがEPUBとWebpubに含まれることがなくなったのを確認しました。

ひとつまだ気になるのが、EPUBの中に publication.json が残っていることです。その内容の "readingOrder" にはEPUB内には存在しない *.html ファイルのurlがあります。このファイルが入っていても実害はないと思いますが、除外したほうがよいのでないでしょうか?

テスト例:

$ ../../vivliostyle-cli/dist/cli.js build --theme @vivliostyle/theme-epub3j TEST.md -o output.epub
◠ Installing theme files
output.epub has been created.
🎉 Built successfully.

$ zipinfo output.epub
Archive:  output.epub
Zip file size: 28867 bytes, number of entries: 17
-rw-r--r--  4.5 unx       20 b- stor 24-Jan-18 02:13 mimetype
-rw-r--r--  4.5 unx      251 bl defN 24-Jan-18 02:13 META-INF/container.xml
-rw-r--r--  4.5 unx      848 bl defN 24-Jan-18 02:13 EPUB/TEST.xhtml
-rw-r--r--  4.5 unx     2076 bl defN 24-Jan-18 02:13 EPUB/content.opf
-rw-r--r--  4.5 unx      868 bl defN 24-Jan-18 02:13 EPUB/publication.json
drwxr-xr-x  4.5 unx        0 b- stor 24-Jan-18 02:13 EPUB/themes/
drwxr-xr-x  4.5 unx        0 b- stor 24-Jan-18 02:13 EPUB/themes/packages/
drwxr-xr-x  4.5 unx        0 b- stor 24-Jan-18 02:13 EPUB/themes/packages/@vivliostyle/
drwxr-xr-x  4.5 unx        0 b- stor 24-Jan-18 02:13 EPUB/themes/packages/@vivliostyle/theme-epub3j/
drwxr-xr-x  4.5 unx        0 b- stor 24-Jan-18 02:13 EPUB/themes/packages/@vivliostyle/theme-epub3j/ebpaj_epub3guide/
-rw-r--r--  4.5 unx     5896 bl defN 24-Jan-18 02:13 EPUB/themes/packages/@vivliostyle/theme-epub3j/ebpaj_epub3guide/book-style.css
-rw-r--r--  4.5 unx    83141 bl defN 24-Jan-18 02:13 EPUB/themes/packages/@vivliostyle/theme-epub3j/ebpaj_epub3guide/style-advance.css
-rw-r--r--  4.5 unx     2568 bl defN 24-Jan-18 02:13 EPUB/themes/packages/@vivliostyle/theme-epub3j/ebpaj_epub3guide/style-check.css
-rw-r--r--  4.5 unx     2262 bl defN 24-Jan-18 02:13 EPUB/themes/packages/@vivliostyle/theme-epub3j/ebpaj_epub3guide/style-reset.css
-rw-r--r--  4.5 unx    52790 bl defN 24-Jan-18 02:13 EPUB/themes/packages/@vivliostyle/theme-epub3j/ebpaj_epub3guide/style-standard.css
-rw-r--r--  4.5 unx     2323 bl defN 24-Jan-18 02:13 EPUB/themes/packages/@vivliostyle/theme-epub3j/theme.css
-rw-r--r--  4.5 unx      617 bl defN 24-Jan-18 02:13 EPUB/toc.ncx
17 files, 153660 bytes uncompressed, 25923 bytes compressed:  83.1%

@spring-raining
Copy link
Member Author

@MurakamiShinyu EPUBにpublication.jsonが含まれてしまう動作は、inputに直接HTML/Markdownを指定したときに起こるバグのようでした。こちらのcommitで修正しました 90ecbbb

Copy link
Member

@MurakamiShinyu MurakamiShinyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@spring-raining spring-raining merged commit 95fe815 into main Jan 20, 2024
11 checks passed
@spring-raining spring-raining deleted the feat/epub-output-improvement branch January 20, 2024 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EPUBとwebpub出力でTheme内のサンプルの画像など不要なファイルが入る
2 participants