Starter project for building typescript projects using Rollup and Jest, React and React Test Library.
This project has been originally inspired, and thus forked from danielelder/typescript-rollup-jest. It shares the same ISC license but doesn't really share much code.
git clone --depth=1 [email protected]:derived-studio/rollup-ts-jest-react.git [yourProjectName]
To remove git history run from project folder
yarn
yarn detach
After detaching remove detach
script from package.json
and run
git add .
git commit "Initial commit"
- Statically typed build system for working with Typescript.
- Consistent code style with TSLint. - (removed)
- Dead code elimination
- Rollup for bundling
- Jest for unit testing and code coverage
- JSDOM for DOM based testing
- Flexible build configuration using environment variables
- Rapid development with automatic javascript building and browser hot reloading
- Easy debugging via VSCode integration
- Uses [email protected] instead of tslint
- Adds NPM distribution friendly output bundle files
- Distributes with TS definition files
- Includes an example build for naive greeter lib
- Improves jest configuration with initial jest setup
- Supports React and React-Dom
- Includes React Testing Library
- Git hooks for pre commit and pre push (with husky)
- Contains
yarn detach
script removing git history
- Clean up npm scripts (in progress)
- Restore serve files
- Include react in an example build
build
- Builds the minified production bundle along with typescript modulestest
- Runs tests with code coverage reportlint
- Lints source filesclean
- removesdist
folderserve
- temporarily disabled Builds the development bundle, creates a local server and watches for changes
Access the task list using shift+command+b
(ctrl+shift+b
in Windows) to run any of the above scripts.
Unit tests can be debugged from within VS Code by placing a break point within your code and then launching the debugger.
Jest - All
- Runs all unit tests in debug modeJest - Current
- Runs the currently visible within VS Code editor
The coverage reports are generated with Jest
, and output to the /coverage
folder.
To view the html report open: coverage/lcov-report/index.html