zihen / react-scripts-ts

@jpavon/react-scripts-ts, react-scripts with ts-loader and type checker on a separate process.

Home Page:https://www.npmjs.com/package/@jpavon/react-scripts-ts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-scripts-ts   +     

License NPM CircleCI Status

@jpavon/react-scripts-ts

Modern build setup with no configuration for React + TypeScript projects.

Main differences with create react app:

Found any problem or bug? Please create a new issue.

Features

Check out the template files for usage examples.

Getting started

Create a new project:

npx create-react-app my-app --scripts-version=@jpavon/react-scripts-ts
cd my-app/
yarn start

(npx comes with npm 5.2+ and higher)

Already using create-react-app / react-scripts?

Install this package in yout project:

yarn add @jpavon/react-scripts-ts

Change your package.json configuration to use react-scripts-ts

{
  "scripts": {
    "start": "react-scripts-ts start",
    "build": "react-scripts-ts build",
    "test": "react-scripts-ts test --env=jsdom",
  }
}

Ejecting

Ejecting is not supported in this project, you have 2 options:

{
  "scripts": {
    "start": "react-app-rewired start --scripts-version @jpavon/react-scripts-ts",
    "build": "react-app-rewired build --scripts-version @jpavon/react-scripts-ts",
    "test": "react-app-rewired test --scripts-version @jpavon/react-scripts-ts --env=jsdom"
  }
}

About

@jpavon/react-scripts-ts, react-scripts with ts-loader and type checker on a separate process.

https://www.npmjs.com/package/@jpavon/react-scripts-ts

License:MIT License


Languages

Language:JavaScript 90.3%Language:TypeScript 7.1%Language:HTML 1.4%Language:CSS 1.2%