Skip to main content

Contributing

LiveBundle is fully open sourced and we welcome contributions !

Ways to contribute

Report an issue or bug

If you are facing an issue or you identified a bug, please open an issue ticket in the adequate repository.

For problems with the command line CLI, you can open an issue in livebundle repository.
For problems with the native module, you can open an issue in react-native-livebundle repository.

Improve documentation

If you identified a typo in our documentation, or if something is not properly explained or if you just want to contribute new documentation, you can open a Pull Request to the livebundle-website repository.

Write a new LiveBundle CLI plugin

The LiveBundle CLI is highly modular thanks to its plugin based architecture. If you would like to contribute a new plugin to make LiveBundle even better, you can refer to our plugin authoring documentation. When you're ready, just open a PR to livebundle repository.

Tackle an easy first task

We label some issues in LiveBundle repositories as good first issue. We consider these issues to be easy enough to be tackled by new contributors not yet super familiar with LiveBundle codebase and architecture.

Tackle some enhancement

Similarly to the good first issue label, we use the enhancement label for any work that would improve LiveBundle. Even though some enhancement labelled issues might also be labelled as good first issue, most of them will not, and will be challenging. If you feel like you have a good understanding of the LiveBundle codebase, you can tackle these ones or just engage on them to suggest ideas.

Suggest improvements or new features

If you have ideas for potential LiveBundle enhancements, but don't feel like implementing these enhancements yourself, you can still contribute by submitting such new ideas.

For suggesting an enhancement to the command line CLI, you can open an issue in livebundle repository.
For suggesting an enhancement to the native module, you can open an issue in react-native-livebundle repository.

LiveBundle CLI Development

Stack

LiveBundle CLI is written in TypeScript.
We use Yarn package manager.
Visual Studio Code is our main development IDE. This IDE is not a requirement to work on LiveBundle but it integrates nicely with our development process and tools.
Our test suites are written using Mocha and Sinon.JS. LiveBundle is using Istanbul to compute test coverage and CodeCov for online coverage reports.
We use ESLint and Prettier for linting and code styling.

Development Setup

  • Make sure you have Yarn installed.
  • Fork the LiveBundle CLI repository and clone your fork locally.
  • Run yarn install from the directory in which you have cloned the project.

Debugging

Debugging can be achieved within Visual Studio Code.

CLI

To debug the CLI, open the LiveBundle project in Visual Studio Code and run yarn debug from a Visual Studio code terminal (important, otherwise Visual Studio code will not auto attach debugger).

This is equivalent to running the livebundle CLI executable (as if running yarn livebundle), but with debugging enabled. It is thus possible to provide any supported livebundle command and option(s) as if directly running the livebundle CLI.

Tests

To debug the tests, launch Mocha Tests debug configuration from the IDE.

Run Mocha Tests

Logging

LiveBundle is using the debug library to for logging.
Please refer to this library documentation for reference.
In a nutshell, to enable all LiveBundle logs, just set DEBUG=livebundle* environment variable.

Before opening a PR

  • Make sure that the code is properly formatted by running yarn lint
  • Make sure that all tests are passing by running yarn test
note

We have 100% code coverage for the LiveBundle CLI and would like to keep it at this level.
Ideally you should add tests to cover all newly introduced code. This is not a strict requirement (our core team will take care of it otherwise) but is always a plus.
To check code coverage you can run yarn coverage. The coverage report will be logged to the terminal after running the tests. You can also see the detailed generated report in coverage/index.html.

Repository structure (curated)

.
├── lerna.json // Lerna configuration
├── packages // Node.js packages
│ ├── livebundle // Command line CLI executable
│ ├── livebundle-bundler-metro // Metro Bundler plugin
│ ├── livebundle-generator-deeplink // Deep link generator plugin
│ ├── livebundle-generator-qrcode // QR Code generator plugin
│ ├── livebundle-notifier-github // GitHub notifier plugin
│ ├── livebundle-notifier-terminal // Terminal notifier plugin
│ ├── livebundle-notifier-viewer // Viewer notifier plugin
│ ├── livebundle-sdk // SDK
│ ├── livebundle-server-metro // Metro Server plugin
│ ├── livebundle-storage-azure // Azure Storage plugin
│ ├── livebundle-storage-fs // File System Storage plugin
│ └── livebundle-utils // Misc utilities
├── tsconfig.build.json // TypeScript config used for builds
├── tsconfig.json // TypeScript config used by monorepo
├── codecov.yml // Codecov configuration
├── .eslintignore.json // Files/Directories to exclude from ESLint
├── .eslintrc.js // ESLint configuration
├── .mocharc.json // Mocha configuration
├── .nycrc // nyc (coverage) configuration
├── .prettier.rc // Prettier configuration
└── .vscode // VSCode IDE configuration
└── settings.json // VSCode workspace configuration

LiveBundle Native Module Development

Stack

As most standard React Native native modules, LiveBundle native module is written using a mix of JavaScript, ObjectiveC and Java.
We unfortunately don't have any tests yet, so testing, is currently limited to manual testing using the example application part of the native module repository.

Development Setup