Skip to main content

Shared Libraries

ChurchApps shared code is published to npm under the @churchapps/* scope. These packages are consumed by all ChurchApps projects as regular npm dependencies.

Packages

PackageDescriptionUsed By
@churchapps/helpersBase utilities (DateHelper, ApiHelper, etc.)All projects
@churchapps/apihelperServer-side Express.js utilitiesAll APIs
@churchapps/apphelperShared React components and utilitiesAll web apps

When developing a shared library alongside a consuming project, use npm link to test changes without publishing to npm:

# Build and link the library
cd Helpers && npm run build && npm link

# Link it into the consuming project
cd ../Api && npm link @churchapps/helpers

This creates a symlink from the consuming project's node_modules/@churchapps/helpers to your local build output, so changes are reflected immediately after rebuilding.

tip

Remember to run npm run build in the library project after making changes — the consuming project reads from the compiled dist/ folder, not the source.

warning

npm link connections are reset whenever you run npm install in the consuming project. You will need to re-run the npm link @churchapps/<package> command after installing dependencies.