dist/
contains fully embedded packaged versions that work on browsers as per common JavaScript package naming convention. All the following files are generated with Webpack with:npm run webpack
npm run build-assets
.The files in that directory are:
dist/ourbigbook.js
: OurBigBook JavaScript API converter for browser usage. The source entry point for it is located at index.js. Contains the code of every single dependency used fromnode_modules
used byindex.js
. This is notably used for the live-preview of a browser editor with preview.dist/ourbigbook_runtime.js
: similardist/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.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-dev
also 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.