therbert-component-library v1.0.1
UCD Advancement Services Module Library
Development, testing, deployment, and version control environment for React components. Built using:
- Storybook
- Lerna
- Jest + Enzyme
- Babel (via create-react-app)
- React
Commands
Start storybook
npm start
Starts a hot-module-reloading environment for developing and testing React components. Defaults to localhost:9001.
Run Jest tests
npm run test
Executes all Jest tests, checking for files ending with .spec.js or .test.js. Defaults to include coverage report in verbose mode.
Bootstrap modules
npm run bootstrap
Automatically installs all modules' dependencies inside of the monorepo, utilizing Lerna's bootstrap command.
Build modules
npm run build
Installs dependencies, babelifies, minifies, etc. for each module inside of the monorepo, utilizing Lerna's exec command. Uses Babel to transpile ES6 code into ES5.
Detailed steps 1. Run eslint to check for syntax errors 2. Run prettier to format code properly 3. Compile code with babel and minify 4. Pipe into the "dist" folder 5. Ignore any .spec.js or .story.js files
Build storybook
npm run build-storybook
Builds the entire storybook into a publishable user interface. This package can be dropped into a web application to enable an interactable website that contains the current state of the monorepo's components.
Publish modules
npm run publish
Installs, builds, and publishes all modules (checking for changes) to npm and github. Will prompt for a new version number for each module, following semver conventions. Requires and existing active login session to publish to npm, utilizing npm login
or npm adduser
.