react-scripts-ts-multi-app
Configuration and scripts for Create React App.
Last updated 6 months ago by bpander .
BSD-3-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install react-scripts-ts-multi-app 
SYNC missed versions from official npm registry.

IMPORTANT NOTE: This is a fork of create-react-app-typescript that allows for multiple apps to have shared build configuration and shared code.

  1. Each "child app" should have a folder as an immediate descendent of the frontend root, each with its own /src folder and tsconfig files. E.g.
create-react-app root
├── app1
│   ├── src
│   ├── tsconfig.json
│   └── tsconfig.test.json
├── app2
│   ├── src
│   ├── tsconfig.json
│   └── tsconfig.test.json
└── shared
    ├── src
    └── tsconfig.test.json
  1. The test, build, and start tasks accept an --appRoot command line argument in order to specify which app you want to test/build/start. E.g. react-scripts-ts test --appRoot=app1 --env=jsdom.

  2. Two additional jest options are allowed to be specified via package.json since you'll most likely be using paths in the tsconfig files (modulePaths and moduleNameMapper).

app1/tsconfig.json

{
  "compilerOptions": {
    "baseUrl": "..",
    "paths": {
      "shared/*": [ "shared/src/*" ],
      "*": [ "app1/src/*" ]
    }
  }
}

package.json

  "jest": {
    "modulePaths": [
      "<rootDir>/src"
    ],
    "moduleNameMapper": {
      "shared/(.*)": "<rootDir>/../shared/src/$1"
    },
    "collectCoverageFrom": [
      ...

react-scripts

This package includes scripts and configuration used by Create React App.
Please refer to its documentation:

Current Tags

  • 2.17.2                                ...           latest (6 months ago)

6 Versions

  • 2.17.2                                ...           6 months ago
  • 2.17.0                                ...           a year ago
  • 2.13.3                                ...           a year ago
  • 2.13.2                                ...           a year ago
  • 2.13.1                                ...           a year ago
  • 2.13.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 6
This Month 6
Last Day 6
Last Week 0
Last Month 3
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |