npm run webpack
npm run build-assets.
The files in that directory are:
index.js. This is notably used for the live-preview of a browser editor with preview.
dist/ourbigbook.js, but contains the converted output of ourbigbook_runtime.js. You should include this in every OurBigBook HTML output.
dist/ourbigbook.css: minimized CSS needed to view OurBigBook output as intended. Embeds all OurBigBook CSS dependencies, notably the KaTeX CSS without which mathematics displays as garbage. The Sass entry point for it is: ourbigbook.scss.
dist/editor.css: the CSS of the editor, rendered from editor.scss.
To develop these files, you absolutely want to use:This runs Webpack in development mode, which has two huge advantages:
npm run webpack-dev
- almost instantaneous compilation, as opposed to the unbearable 5 seconds+ of an optimized build
- source maps are enabled, so you can see the fully: blog.jakoblind.no/debug-webpack-app-browser/
npm run webpack-devalso enables watch mode, so it keeps running until you turn it off.
This setup also works seamlessly when developing OurBigBook Web, just let the watch process run in a separate terminal.