Compare commits

..
3 Commits
3 changed files with 9 additions and 4 deletions

No files matched your search

+3 -1
View File
@@ -17,7 +17,7 @@ node setup.js
### What is included in this template?
- [TypeScript](https://github.com/Microsoft/TypeScript)
- [React Native TypeScript Transformer](https://github.com/ds300/react-native-typescript-transformer)
- [React Native TypeScript transformer](https://github.com/ds300/react-native-typescript-transformer)
- [Type definitions for React & React Native](https://github.com/DefinitelyTyped/DefinitelyTyped)
- [TS Jest](https://github.com/kulshekhar/ts-jest)
- [TSLint](https://github.com/palantir/tslint)
@@ -25,6 +25,8 @@ node setup.js
This template always uses the latest versions of the dependencies at the time when the setup script (`node setup.js`) is being executed. This means you don't have to worry about old versions.
Lots of :heart: and credits to the owners and maintainers of those packages.
### Why the setup script?
The React Native CLI supports automatic installation of production dependencies only. Since TypeScript and the other dependencies are dev dependencies, the setup script is being used to install those. It also takes care of obsolete files like the `.flowconfig` and the `setup.js` itself after the setup.
+4 -3
View File
@@ -10,10 +10,11 @@
"url": "git+https://github.com/emin93/react-native-template-typescript.git"
},
"keywords": [
"react",
"native",
"template",
"react-native",
"typescript",
"tslint",
"jest",
"template",
"boilerplate"
],
"author": "Emin Khateeb <emin@emin.ch>",
+2
View File
@@ -9,6 +9,8 @@ const devDependencies = require('./devDependencies.json');
const deleteFile = (fileName) => fs.unlinkSync(path.join(process.cwd(), fileName));
const writeFile = (fileName, data) => fs.writeFileSync(path.join(process.cwd(), fileName), data);
console.log('🔄 Please wait...');
packageJson.scripts.start = `${packageJson.scripts.start} --config ../../../../rn-cli.config.js`;
packageJson.scripts.lint = 'tslint -c tslint.json "src/**/*.{ts,tsx}"';
packageJson.jest = Object.assign(packageJson.jest, jestJson);