1.0.61 • Published 1 year ago

@lavalogic/flowms-react-components v1.0.61

Weekly downloads
17
License
ISC
Repository
bitbucket
Last release
1 year ago

FloWMS React Component Library

This repository contains the FloWMS React component library.

Contribute

View Storybook Docs


Release a version

For a new version to be pushed to npm, a tagged commit must be made to the master branch, so the bitbucket pipeline runs.

One-time setup

Ensure that you have your git config set to push tags by running the command:

git config --global push.followTags true

Release workflow

When you are happy with your work and ready to push to the origin repo, the first thing is to open package.json and increment the version number.

Note: Follow semvar practices, e.g vX.0.0 denotes a major (breaking) version, v0.X.0 is a minor (non-breaking) version and v0.0.X is a patch. See the package.json for the most recent version number.

Git workflow:

Start by committing your changes to git using your usual commands (or those shown here):

git add .
git commit -am "My commit"

Check to see if you need to pull in any other changes from the origin branch and, if needed, do so with the command:

git pull origin <branch>

With all the changes ready to be pushed, select the latest commit hash (either the merge or your own commit) and create a new version tag. This tag should be the same as the version shown in the package.json file:

Note: Follow semvar practices, e.g vX.0.0 denotes a major (breaking) version, v0.X.0 is a minor (non-breaking) version and v0.0.X is a patch. See the package.json for the most recent version number.

git tag -a <version> -m <message> <commit>
git tag -a 1.0.4 -m "Version 1.0.4" 4b4aa87

Once tagged, push the branch up to the origin branch:

git push origin <branch>

Initial Setup

Setup

Install all dependencies.

$ npm install

Develop

Bundles all components using Storybook, starts the dev server and watches for changes.

$ npm run dev

Adding Icons

When adding new icons to this repo, they must fit the following spec:

  1. Icons should be SVGs.
  2. Icons should have lowercase, hyphenated names your-icon.svg, as spaces in filenames may cause issues across browsers or operating systems.
  3. Icons should not have an inline fill property, this can cause colours passed via CSS to appear incorrectly or not at all. Included in this repo is a handy CLI batch processing tool to help you with the above:
  4. First, ensure you have put all your svg files in src/assets/icons/.
  5. To process all icon files to adhere to the above spec, run npm run icon:files.
  6. To generate a temporary file that has icon stories (to paste into Storybook) and generate TypeScript types, run npm run icon:stories. Copy your types into src/components/Icon/types and your stories in src/components/Icon/Icon.stories.mdx. Remember to delete the generated temp file too.

Scaffold

You can quickly scaffold a new component by running:

$ NAME=MyNewComponent npm run scaffold

OR

$ NAME=MyNewComponent npm run scaffold:stateful

This will create a new stateless (functional) or stateful (using hooks) component folder with all the required files and some example variants. This is the best way of ensuring a new component complies with our coding standards and naming conventions.

Build

Bundles everything using webpack and outputs to /dist/ ready to be republished to npm.

$ npm run build

Run individual tasks:

CommandDescription
$ npm run build:componentsBuild just the components
$ npm run build:docsBuild just storybook documentation

Testing

Run all tests:

$ npm run test

Run individual tests:

CommandDescription
$ npm run test:cypressRun automated browser tests
$ npm run test:unitRun component unit tests
$ npm run test:coverageRun coverage tests and send coverage report
1.0.61

1 year ago

1.0.59

2 years ago

1.0.55

3 years ago

1.0.58

3 years ago

1.0.57

3 years ago

1.0.56

3 years ago

1.0.48

3 years ago

1.0.51

3 years ago

1.0.50

3 years ago

1.0.54

3 years ago

1.0.53

3 years ago

1.0.52

3 years ago

1.0.47

3 years ago

1.0.46

3 years ago

1.0.45

3 years ago

1.0.44

3 years ago

1.0.43

3 years ago

1.0.42

3 years ago

1.0.41

3 years ago

1.0.40

3 years ago

1.0.39

4 years ago

1.0.38

4 years ago

1.0.36

4 years ago

1.0.35

4 years ago

1.0.34

4 years ago

1.0.33

4 years ago

1.0.32

4 years ago

1.0.31

4 years ago

1.0.30

4 years ago

1.0.29

4 years ago

1.0.28

4 years ago

1.0.27

4 years ago

1.0.26

4 years ago

1.0.25

4 years ago

1.0.24

4 years ago

1.0.22

4 years ago

1.0.23

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.3

5 years ago