1.9.0 • Published 4 years ago

rc-shared-components v1.9.0

Weekly downloads
1
License
MIT
Repository
bitbucket
Last release
4 years ago

Red Coral Shared Components Library

npm i --save rc-shared-components

This is a library of React components wrapping Semantic UI React components, styled per the Red Coral design language. Each component is prefixed with an "RC" (RCButton, RCInput), and so on.

Project Structure

Running the Demo Locally

Prerequisites

  • If you get an error running any npm command, it is because you do not have Node installed on your machine. To do so, Download Node here and follow the steps in the Node installer before proceding with the following steps.

Steps

  1. Open Terminal or Command Prompt and navigate to the root directory of rc-shared-components.
cd <YOUR_WORKSPACE_PATH>/rc-shared-components
  1. Copy the command below which will ensure you have the latest packages, and then will start the Storybook components demo.
npm i && npm start

When this command has finished running, it will open up a browser window / tab at http://localhost:6006.

Development

Testing

npm run test

Building

npm run build

Storybook

To run a live-reload Storybook server on your local machine:

npm run storybook:start

To export your Storybook as static files:

npm run storybook:build

You can then serve the files under storybook-static using S3, GitHub pages, Express etc.

Installing Component Library Locally

Let's say you have another project (test-app) on your machine that you want to try installing the component library into without having to first publish the component library.

First let's create an npm link for the component library, so that it will pull from our local copy. At the root of rc-shared-components, simply run:

npm link

Then, in the test-app directory, you can run:

npm link rc-shared-components

which will link the local component library as a dependency in test-app. It'll then appear as a dependency in package.json like:

  ...
  "dependencies": {
    ...
    "rc-shared-components": "file:rc-shared-components",
    ...
  },
  ...

Your components can then be imported and used in that project.

Publishing

First, make sure you have an NPM account and are logged into NPM using the npm login command.

  • Make sure to update the version number in package.json following the correct SEMVER guidelines
  • Update the CHANGELOG.md document with the changes
  • Then run the following command which will build and publish the dist to npm:
npm run build:publish
1.9.0

4 years ago

1.8.1

4 years ago

1.8.0

4 years ago

1.7.6

4 years ago

1.7.5

4 years ago

1.7.4

4 years ago

1.7.3

4 years ago

1.7.2

4 years ago

1.7.1

4 years ago

1.7.0

4 years ago

1.6.1

4 years ago

1.6.0

4 years ago

1.5.1

4 years ago

1.5.0

4 years ago

1.4.4

4 years ago

1.4.3

4 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.1

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.3.0

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago