본문으로 건너뛰기

Shared Libraries

ChurchApps shared code is published to npm under the @churchapps/* scope. These packages provide common utilities, server-side helpers, and React components that 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.

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.

경고

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.