Contributor
Thank you for considering a contribution to the Movie Masher open source project! It is a labor of love, written and distributed by a single developer devoted to making complex media tools available to a wider audience. Donations free up more time to add features and improve stability.
Pull requests are also encouraged, especially those that enhance the documentation. Familiarity with tooling like git, npm, and docker is required to work effectively with the Movie Masher monorepo.
Monorepo Installation
GitHub/MovieMasher |
---|
The following Git command will copy the entire Git project to your local machine, complete with examples, tests, and documentation:
git clone https://github.com/moviemasher/moviemasher.js.git
Each of the published modules has a project directory within the /packages directory. Each of the example deployments has a project directory within the /workspaces directory. Both these directories are specified as workspaces in the main /package.json file. Learn more about the monorepo structure in the Architecture Overview.
Development Environment
DockerHub/MovieMasher |
---|
Docker is used extensively during development to assure consistent build and test environments. Standard NPM scripts like build
, test
, and start
run within Docker containers rather than directly on your local (host) computer. These containers are launched from Docker images that are based off the latest publicly available DockerHub image. Unless you want to make changes to that image, it's fastest to download a local copy of it with the following command:
docker pull moviemasher/moviemasher.js:5.1.1
This image was constructed using the Dockerfile
and shell scripts in /dev/image. If changes are made there, you'll want to rebuild the base image with the following command:
npm run build-image
If neither of these steps are explicitly taken, running standard NPM scripts will trigger the later step which takes much longer.
Bundling Code
Changes made to source files in /packages/*/src will not be reflected in running examples until that code is rebundled. All formats of all published packages can be bundled with the following command:
npm run build
This triggers the build
NPM script in /dev/build/package.json which in turn triggers other scripts there which can be selectively run by providing their name as an additional argument to the command above. For instance, if you made changes to files in /packages/client-react/src/ you could just rebundle the client files with the following command:
npm run build client
Running Examples
The following command will launch the base image in a new container, with all the bundled code mounted:
npm start
You can then load Movie Masher by navigating your web browser to http://localhost:8570 and supplying any username/password combination when prompted. When you're done exploring, execute the follow command to stop the server and clean up:
npm stop
Running Tests
The following command will launch the tester image in a new container, with all the bundled code mounted:
npm test