-
Notifications
You must be signed in to change notification settings - Fork 1
Installing b ber for development
The b-ber repository is a monorepo that is managed with Lerna. This means that a number of b-ber packages are published to npm from the same codebase.
$ git clone https://github.com/triplecanopy/b-ber.git
$ npm i
$ cd b-ber/packages/b-ber-reader
$ npm i
$ cd ../../
$ npm run bootstrap
$ npm run build
To use to the b-ber CLI, use either npm link
or create an alias to the b-ber-cli
package. Ensure the repo is up-to-date before running the following from the b-ber repository.
$ npm run bootstrap
$ npm run build
$ cd packages/b-ber-cli
$ npm unlink
$ npm link
This method allows you to run bber
commands without having to re-link the package whenever a file changes.
- Add an alias to
bber
as_bber
in your.bash_profile
/.zshrc
/ or whichever file is loaded at startup..bash_profile
is used an an example below.
Note: Take notice of the leading underscore in the alias _bber
.
$ echo "alias _bber=\"$(pwd)/packages/b-ber-cli/dist/index.js\"" >> ~/.zshrc
- Reload the shell.
$ source ~/.zshrc
- Test that everything is working.
$ _bber --version
$ git pull origin main
$ npm run bootstrap
$ npm run build
The b-ber-reader can be tested out independently of the rest of the application. Add unzipped Epubs to the packages/b-ber-reader/epub
directory and run the following.
$ cd packages/b-ber-reader
$ npm start
This will open the contents of the packages/b-ber-reader/epub
in a web browser.
The b-ber-reader will need to be re-built to function with the rest of the application once development is finished.
npm run lerna run build -- --scope=@canopycanopycanopy/b-ber-reader
- Adding metadata
- Creating content
- Generating new content
- Authoring and editing content
- Reading order (Table of Contents)
- Configuring the build
- Adding a cover image
- All directives
- Text
- Media
- Misc