Skip to content

Latest commit

 

History

History
85 lines (57 loc) · 2.69 KB

CONTRIBUTING.md

File metadata and controls

85 lines (57 loc) · 2.69 KB

Contributing to VideoBrew

🚧 Work in progress

If you're interested in contributing, please open an issue, or make a pull request.

Debugging

Prefix DEBUG=1 to any command to enable debug logging. For example:

$ DEBUG=1 videobrew preview

Development

  1. Clone the repo

  2. Install dependencies for all packages:

    $ npm install # run in project root
  3. Go into the package you wish to maintain and watch for changes using:

    $ npm run watch # run in packages/<package to maintain>
  4. Ensure that the videobrew CLI and editor are linked as global packages:

    $ cd packages/cli # run this in project root to get to the CLI dist (ensure it's built first)
    $ npm link
    $ cd ../../editor
    $ npm link
  5. You can now run the CLI from anywhere and preview your video app:

    # For example
    $ cd ../../../examples/0-dependencies
    $ videobrew preview

Testing

Most packages are tested using Jest and some with additional Playwright end-to-end tests (e2e). To run tests go into the package you wish to test and run:

$ npm run ci:test # run in packages/<package to test>

To run all tests for all testable packages run that command in the project root.

Building

Run:

$ npm run build # run in project root

This will:

  1. Discover third-party licenses used and generate a LICENSES-THIRD-PARTY file in the project root (scripts/licenses.mjs).

  2. Clear the dist directories in each package (by scripts/clear-build.mjs).

  3. Call the build script in each package to compile its TypeScript code. Build output is placed in the dist directory of each package.

  4. Build a readme for each package containing the project root readme and a package specific readme. It will also copy LICENSE and LICENSES-THIRD-PARTY. All this will be placed in the package root directory (by scripts/docs-build.mjs).

Publishing

  1. Run:

    npx lerna publish --no-private --force-publish # run in project root

    We will use --force-publish to ensure that all packages are versioned the same.

  2. Choose the desired version number.

  3. The packages will be versioned and pushed to Git for a GitHub release.

  4. The production-needed contents of each package directory will be published to npm.