Services are loosely coupled to the rest of the Theatersoft platform using Bus messaging. They should be built as separate modules from their own source repositories and published as individual NPM packages. They should only share a module when several service exports are closely related by a common codebase.
Runtime package vs. source repo
A default site deployment consists of a
/opt/theatersoft/package.json containing all the service dependencies and
npm install in that directory. Those installed dist packages will be replaced by links their locally built versions during the development process.
Module Build Details
Theatersoft modules are built with custom build.js scripts following common conventions.
Npm CLI Quality Issues
The abysmal state of the npm CLI requires workarounds for long-standing bugs (10343, 16853, 17287) related to npm breaking when using the npm-link feature. There will be situations noted where
npm fails but the
yarn alternative works properly.
- Linux development machine
- Theatersoft site deployed in
theatersoft/theatersoft Github repo contains submodule links to each of the required repos and build scripts to perform a full build.
mkdir Theatersoft && cd Theatersoft git clone --recursive [email protected]:theatersoft/theatersoft.git npm run install-link-build-install-link