-
Notifications
You must be signed in to change notification settings - Fork 34
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
New dev server #219
New dev server #219
Conversation
There hasn't been any comments on readium/r2-streamer-js#56 so maybe we merge it into our fork of r2-streamer-js and then publish our own version of it? Or we could ask them to merge this |
Hello, I have been thinking about it. I will get back to you shortly with comments. |
@danielweck thanks so much! |
@kristojorg That would be fine, we just need to make sure that any of the injectable examples are still working as well. but from what i understand we will use dist then directly, for the injectables, same as the reader.js and reader.css ? |
Yep exactly we would be serving viewer/index.html <script src="reader.js" />
...
<link rel="stylesheet" href="reader.css" /> |
How should I make sure that the injectables examples still work? How do I run them / which ones are they? |
For example here https://github.com/d-i-t-a/R2D2BC/blob/production/viewer/index_dita.html#L554 |
the example injectables are specified here https://github.com/d-i-t-a/R2D2BC/blob/feature/new-streamer/webpack.config.js#L54 You see there that glossary and footnotes are really just examples, the style.css is not specified in the webpack for example. |
Ok right now injectables are compiled into |
01ceabb
to
bfe8a61
Compare
Closing in favor of #243 |
This PR adds a
server.ts
file which is our new dev server. It usesr2-streamer-js
to set up the express server, but also statically serves the contents of/viewer
and/dist
so that we don't have to manually copy files around after building.Clicking on a publication will give you the option to view it using any of the examples in /viewer.
We need to wait for readium/r2-streamer-js#56 to merge and a new release before we can merge this though.
@aferditamuriqi what do you think about moving
/viewer
into/examples/html
? That was the/examples
folder holds all the code for the examples, whether react or html based.This also checks in a single example epub, but we can remove it and gitignore it if you'd rather do that. The folder for sample epubs is now:
/examples/epubs
.To give this a try, run
npm run build
thennpm run examples
on this branch.