Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e31c51d8c5 | ||
|
|
e75a4da89d | ||
|
|
b71dc7e3c4 | ||
|
|
0f552603cb | ||
|
|
0768a6257c | ||
|
|
fe7597ca09 | ||
|
|
b51d726881 | ||
|
|
9721ad6530 | ||
|
|
b228bb4f36 | ||
|
|
c6cbf56aed | ||
|
|
97560eda3e | ||
|
|
d7f37a9bc8 | ||
|
|
30309db6e7 |
No files matched your search
@@ -25,23 +25,23 @@
|
|||||||
|
|
||||||
## :arrow_forward: Usage
|
## :arrow_forward: Usage
|
||||||
|
|
||||||
> `react-native@0.61.0` or higher
|
### Note on the legacy CLI
|
||||||
|
There seems to be quite some confusion about the legacy CLI. This template only works with the new CLI. Make sure you have uninstalled the legacy `react-native-cli` first (`npm uninstall -g react-native-cli`), for the above command to work. If you wish to not use `npx`, you can also install the new CLI globally (`npm i -g @react-native-community/cli` or `yarn global add @react-native-community/cli`).
|
||||||
|
|
||||||
|
Further information can be found here: https://github.com/react-native-community/cli#about
|
||||||
|
|
||||||
|
### `react-native@0.61.0` or higher
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npx react-native init MyApp --template react-native-template-typescript
|
npx react-native init MyApp --template react-native-template-typescript
|
||||||
```
|
```
|
||||||
|
|
||||||
> `react-native@0.60.x`
|
### `react-native@0.60.x`
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npx react-native init MyApp --template react-native-template-typescript@6.2.0
|
npx react-native init MyApp --template react-native-template-typescript@6.2.0
|
||||||
```
|
```
|
||||||
|
|
||||||
### Note on the legacy CLI
|
|
||||||
There seems to be quite some confusion about the legacy CLI. This template only works with the new CLI. Make sure you have uninstalled the legacy `react-native-cli` first (`npm uninstall -g react-native-cli`), for the above command to work. If you wish to not use `npx`, you can also install the new CLI globally (`npm i -g @react-native-community/cli` or `yarn global add @react-native-community/cli`).
|
|
||||||
|
|
||||||
Further information can be found here: https://github.com/react-native-community/cli#about
|
|
||||||
|
|
||||||
## :computer: Contributing
|
## :computer: Contributing
|
||||||
|
|
||||||
Contributions are very welcome. Please check out the [contributing document](CONTRIBUTING.md).
|
Contributions are very welcome. Please check out the [contributing document](CONTRIBUTING.md).
|
||||||
|
|||||||
@@ -6,25 +6,27 @@
|
|||||||
"android": "react-native run-android",
|
"android": "react-native run-android",
|
||||||
"ios": "react-native run-ios",
|
"ios": "react-native run-ios",
|
||||||
"start": "react-native start",
|
"start": "react-native start",
|
||||||
"test": "jest"
|
"test": "jest",
|
||||||
|
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react": "16.9.0",
|
"react": "16.9.0",
|
||||||
"react-native": "0.61.2"
|
"react-native": "0.61.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.6.2",
|
"@babel/core": "^7.6.2",
|
||||||
"@babel/runtime": "^7.6.2",
|
"@babel/runtime": "^7.6.2",
|
||||||
"@react-native-community/eslint-config": "^0.0.5",
|
"@react-native-community/eslint-config": "^0.0.5",
|
||||||
"@types/jest": "^24.0.18",
|
"@types/jest": "^24.0.18",
|
||||||
"@types/react": "16.9.0",
|
"@types/react-native": "^0.60.22",
|
||||||
"@types/react-native": "^0.60.17",
|
|
||||||
"@types/react-test-renderer": "16.9.0",
|
"@types/react-test-renderer": "16.9.0",
|
||||||
|
"@typescript-eslint/parser": "^2.12.0",
|
||||||
"babel-jest": "^24.9.0",
|
"babel-jest": "^24.9.0",
|
||||||
|
"eslint": "^6.5.1",
|
||||||
"jest": "^24.9.0",
|
"jest": "^24.9.0",
|
||||||
"metro-react-native-babel-preset": "^0.56.0",
|
"metro-react-native-babel-preset": "^0.56.0",
|
||||||
"react-test-renderer": "16.9.0",
|
"react-test-renderer": "16.9.0",
|
||||||
"typescript": "^3.6.3"
|
"typescript": "^3.7.3"
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
"preset": "react-native",
|
"preset": "react-native",
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
/* Basic Options */
|
/* Basic Options */
|
||||||
"target": "esnext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
|
"target": "esnext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
|
||||||
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
|
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
|
||||||
"lib": ["es6"], /* Specify library files to be included in the compilation. */
|
"lib": ["es6"], /* Specify library files to be included in the compilation. */
|
||||||
"allowJs": true, /* Allow javascript files to be compiled. */
|
"allowJs": true, /* Allow javascript files to be compiled. */
|
||||||
// "checkJs": true, /* Report errors in .js files. */
|
// "checkJs": true, /* Report errors in .js files. */
|
||||||
"jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
|
"jsx": "react-native", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
|
||||||
// "declaration": true, /* Generates corresponding '.d.ts' file. */
|
// "declaration": true, /* Generates corresponding '.d.ts' file. */
|
||||||
// "sourceMap": true, /* Generates corresponding '.map' file. */
|
// "sourceMap": true, /* Generates corresponding '.map' file. */
|
||||||
// "outFile": "./", /* Concatenate and emit output to single file. */
|
// "outFile": "./", /* Concatenate and emit output to single file. */
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
||||||
// "removeComments": true, /* Do not emit comments to output. */
|
// "removeComments": true, /* Do not emit comments to output. */
|
||||||
"noEmit": true, /* Do not emit outputs. */
|
"noEmit": true, /* Do not emit outputs. */
|
||||||
|
"incremental": true, /* Enable incremental compilation */
|
||||||
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
|
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
|
||||||
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
|
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
|
||||||
"isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
|
"isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
|
||||||
@@ -58,4 +59,4 @@
|
|||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules", "babel.config.js", "metro.config.js", "jest.config.js"
|
"node_modules", "babel.config.js", "metro.config.js", "jest.config.js"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user