1.0.0 • Published 4 years ago
@moneypensionservice/directories_library v1.0.0
React component library for Directories project
List of the technologies used in this library:
- React for creating components and styled-components for styling;
- Styleguidist for both live development and generating documentation;
- Jest with React Testing Library for testing;
- Rollup and Babel for bundling the library for publishing to NPM;
- Travis CI for auto-deployment of the documentation to GitHub pages.
Development Scripts
Install Dependencies
$ npm install
Preview Components
$ npm start
- live reloading and preview of the components at
http://localhost:6060
- live reloading and preview of the components at
Testing
$ npm test
Build for Production
Note: Update the package version in package.json
before building
$ npm run prepublishOnly
- cleanup and rebuild the files in the
lib
directory
- cleanup and rebuild the files in the
$ npm run postbuild
- shows the contents of the package that will be published to NPM
Publish Package to NPM
$ npm login
- use maps credentials in keypass to sign in
$ npm publish
Deploying the Documentation
Documentation will automatically updated via TravisCI when changes are made to the master branch if the build is successfull. It is available online as a GitHub Page at https://moneyadviceservice.github.io/react_library/.
To build the documentation locally:
$ npm run docs:build
- generate the Styleguidist documentation to the
dist-docs
directory
- generate the Styleguidist documentation to the
1.0.0
4 years ago