1.0.10 • Published 6 years ago

shared-packages v1.0.10

Weekly downloads
4
License
ISC
Repository
github
Last release
6 years ago

shared-packages

A repository for NPM packages that are shared between projects.

This project uses Lerna to manage multiple NPM packages within a single repository, which assists with managing dependencies and publishing to NPM. Please read up on semantic versioning in NPM before working on this project and publishing packages.

We use private NPM modules and therefore have an account with npmjs.com which you will need access to. Our NPM organisation name is moshtix hence the @@moshtix prefix on all of our packages.

Packages are either components (React) or helpers (generally a single reusable function).

To assist with development and documentation of components, we use React Storybook, which enables live preview of components in isolation with hot reloading. All component packages should include one or more 'stories' so that the component is displayed and documented in the storybook app.

Getting started

Login to npm with your username and password (see notes above about private NPM modules)... npm login Install lerna globally... npm i -g lerna Install root dependencies... npm i Run lerna bootstrap with hoist option to sort out package dependencies... npm run bootstrap Start storybook to demo/test components in isolation... npm start

Publishing

Lerna tracks which projects have changed based on the files you have committed (I think?).

So, make some changes, test, commit, push, then use lerna to publish... npm run publish Follow the prompts to set package versions according to NPM semantic versioning guidelines (whether breaking changes have been introduced or not)

Other commands

To lint... npm run lint To test... npm run test To remove all local dependencies so you start fresh (getting started) (run twice)... npm run clean To publish changes to NPM run... npm run publish And follow prompts.

#Helpful Hints

  • You can cd into the individual packages and manage the package as if it was a stand alone repo i.e. npm i -D xxx, npm test, npm publish etc.
1.0.10

6 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago