Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Commit

Permalink
Merge pull request #4 from dclark27/RemovingReactScripts
Browse files Browse the repository at this point in the history
Removing react scripts, fixing tests and build issues
  • Loading branch information
dclark27 authored Dec 14, 2018
2 parents 72a763f + 041afda commit 08d967c
Show file tree
Hide file tree
Showing 12 changed files with 4,872 additions and 11,212 deletions.
1 change: 0 additions & 1 deletion .storybook/addons.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import '@storybook/addon-actions/register';
import '@storybook/addon-links/register';
import '@storybook/addon-knobs/register';
1 change: 0 additions & 1 deletion .storybook/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'bootstrap/dist/css/bootstrap.min.css';
import { configure, addDecorator } from '@storybook/react';
import { withInfo } from '@storybook/addon-info';
import { withKnobs } from '@storybook/addon-knobs';
Expand Down
24 changes: 9 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Storybook TypeScript React Component Library

Simple to use React Component Library with Storybook using TypeScript 3.0 and Storybook 4.0. Bootstrapped using Create-React-App 2.1.
Simple to use TypeScript React Component Library with Storybook 4.1 and test running with Jest.

Compiles all code to a build folder for exporting. Creates a static version of Storybook site for hosting. Makes assumptions on TypeScript, TSLint, Webpack, and storybook Addon configurations.

Expand All @@ -16,24 +16,18 @@ Starts the storybook site at http://localhost:53217/

### `npm test`

Launches the test runner in the interactive watch mode.<br>
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
Runs all tests with Jest and React-Test-Renderer

### `npm run build`

Compiles source files into build directory with type annotations upon succesful lint.

Builds a static site of storybook to be hosted to your liking.
### `npm test:update`

### `npm run eject`
Runs all tests and updates snapshots for jest and create a coverage report

*From Create-React-App 2.0*
### `npm test:coverage`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
Runs tests and creates a coverage report

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
### `npm run build`

Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
Compiles source files into build directory with type annotations upon succesful lint and typescript rules passing.

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
Builds a static site of storybook to be hosted to your liking.
4 changes: 4 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
};
Loading

0 comments on commit 08d967c

Please sign in to comment.