@untappd/consumer-shared
v0.0.16
Published
Shared TypeScript types
Downloads
169
Keywords
Readme
@untappd/consumer-shared
This is a library that we publish to npm that allows us to share types and other TypeScript code between this untappd-next repo and the React Native app.
It works by bundling all the TypeScript code defined in consumer-shared/index.ts
, so if there is something you want to share with the app just make sure that it is exported from that file. Be wary and intentional with what you export because it will get published publicly.
Publishing
For starters, you'll need to be authenticated via npm (npm login
) with an account that's a member of the @untappd organization.
From the consumer-shared
directory:
- Run
npm install
if you haven't yet - Run
npm run release
. This will bundle the TS and publish a new patch version on npm. You should commit the updatedconsumer-shared/package.json
file so that our version number stays up to date.
On the React Native app, we have @untappd/consumer-shared
defined as a dependency and that allows us to import things as needed, i.e. import { AlgoliaCatalogItem } from '@untappd/consumer-shared'