3.0.0 • Published 4 years ago

makeup-components v3.0.0

Weekly downloads
24
License
Apache-2.0
Repository
bitbucket
Last release
4 years ago

☢ react-components ☢

Debugging tests

In VSCode add this configuration:

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Debug CRA Tests",
      "type": "node",
      "request": "launch",
      "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/react-scripts",
      "runtimeArgs": ["--inspect-brk", "test"],
      "args": ["--runInBand", "--no-cache", "--env=jsdom"],
      "cwd": "${workspaceRoot}",
      "protocol": "inspector",
      "console": "integratedTerminal",
      "internalConsoleOptions": "neverOpen"
    }
  ]
}

JetBrains IDE:

In the Jest run/debug configuration specify the path to the revlout-react-scripts package in the Jest package field and add --env=jsdom to the Jest options field.

Commands

To develop components run

npm run sg

To test

npm run test
# For watch mode
npm run test:watch
# For tests with coverage info
npm run test:coverage

To publish your lib run (which also will run a build process)

npm run release

More details

As an example in boilerplate there is a normalize.css imported to styleguidist. Landing page is empty styled with styled-components.

There is also stylelint with styled-components preprocessor for linting styles in them. And hence no stylelinting of plain CSS.

All your components should be in src/components folder, so it will be visible by styleguidist and so they will be bundled to the lib for future publishing.

There is CRA (revolut-react-scripts) underneath, so you can use all its goodness to write your landing page and also for testing your components library, collect test coverage on them etc. All setup this way so they will run only on src/components and will ignore all other folders which are not related to components library.

Readme for your lib lay down in LIBRARY.md and will automatically be attached to the newly released version of the lib.

More on release process

Basically when you run npm run release It will run prettier, all linters, then all tests, and after all will bundle ignoring test.js your components. After that it will generate package.json for lib folder so handy name/Button imports will be possible. Then he will run npm publish on that newly created package.json and publish on Github Pages updated docs of your components.

All you need to do is to change package name in scripts/copyBuildFiles.js on line 52. Version of the components lib will be derived from root package.json

3.0.0

4 years ago

2.0.14

5 years ago

2.0.13

5 years ago

2.0.12

5 years ago

2.0.11

5 years ago

2.0.10

5 years ago

2.0.9

5 years ago

2.0.8

5 years ago

2.0.7

5 years ago

2.0.6

5 years ago

2.0.5

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

2.0.0-RC.4

5 years ago

2.0.0-RC.3

5 years ago

2.0.0-RC.2

5 years ago

2.0.0-RC.1

5 years ago

1.0.7

5 years ago

1.0.6-alpha.4

5 years ago

1.0.6-alpha.3

5 years ago

1.0.6-alpha.1

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.3-2

6 years ago

0.0.3-1

6 years ago

0.0.3-0

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago

0.0.1-beta.3

6 years ago

0.0.1-beta.2

6 years ago