Skip to content

Commit 3bc19af

Browse files
authored
refactor(template): update template modules to new cli config
1 parent 66f04ca commit 3bc19af

File tree

127 files changed

+4956
-198
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+4956
-198
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ There is a huge variety of customizable layouts, use “as is” or add new bloc
3434
Start a new app with UI Kitten template from a scratch:
3535

3636
```bash
37-
react-native init AwesomeApp --template ui-kitten
37+
npx react-native init MyApp --template react-native-template-ui-kitten
3838
```
3939

4040
This will setup a new React Native application configured with UI Kitten.

docs/src/articles/guides/install-new.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ If you don't have any code yet, please consider checking <a href="https://facebo
66

77
## Installation
88

9-
First of all, you should have React Native CLI installed.
9+
First of all, you should have npx installed.
1010

1111
```bash
12-
npm i -g react-native-cli
12+
npm i -g npx
1313
```
1414

1515
<hr>
@@ -19,12 +19,12 @@ npm i -g react-native-cli
1919
A new project can be created using React Native CLI tools ant UI Kitten template.
2020

2121
```bash
22-
react-native init AwesomeApp --template ui-kitten
22+
npx react-native init MyApp --template react-native-template-ui-kitten
2323
```
2424

2525
Or, if you want to init with TypeScript:
2626
```bash
27-
react-native init AwesomeApp --template ui-kitten-typescript
27+
npx react-native init MyApp --template react-native-template-ui-kitten-typescript
2828
```
2929

3030
That's it. UI Kitten is ready now. For the next steps, simply follow command line instructions.

src/templates/template-ui-kitten-typescript/App.tsx

Lines changed: 0 additions & 39 deletions
This file was deleted.

src/templates/template-ui-kitten-typescript/_tsconfig.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/templates/template-ui-kitten-typescript/dependencies.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/templates/template-ui-kitten-typescript/devDependencies.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/templates/template-ui-kitten-typescript/install.js

Lines changed: 0 additions & 72 deletions
This file was deleted.

src/templates/template-ui-kitten-typescript/jest.config.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/templates/template-ui-kitten-typescript/package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
{
22
"name": "react-native-template-ui-kitten-typescript",
3-
"description": "React Native template with UI Kitten and TypeScript",
43
"version": "4.2.0-beta.2",
54
"license": "MIT",
65
"author": "akveo <contact@akveo.com>",
76
"homepage": "https://github.com/akveo/react-native-ui-kitten#readme",
8-
"repository": "git+https://github.com/akveo/react-native-ui-kitten.git",
7+
"repository": {
8+
"type": "git",
9+
"url": "git+https://github.com/akveo/react-native-ui-kitten.git"
10+
},
911
"bugs": {
1012
"url": "https://github.com/akveo/react-native-ui-kitten/issues"
1113
},
1214
"keywords": [
1315
"react-native",
14-
"ui-kitten",
1516
"typescript",
17+
"jest",
1618
"template",
1719
"boilerplate"
1820
],
19-
"scripts": {
20-
"install": "node install.js"
21-
}
21+
"files": [
22+
"template",
23+
"template.config.js"
24+
]
2225
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
placeholderName: 'HelloWorld',
3+
templateDir: './template',
4+
};
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/**
2+
* Sample React Native App
3+
* https://github.com/facebook/react-native
4+
*
5+
* Generated with the UI Kitten TypeScript template
6+
* https://github.com/akveo/react-native-ui-kitten
7+
*
8+
* Documentation: https://akveo.github.io/react-native-ui-kitten/docs
9+
*
10+
* @format
11+
*/
12+
13+
import React from 'react';
14+
import {
15+
ImageProps,
16+
ImageStyle,
17+
StyleSheet,
18+
} from 'react-native';
19+
import {
20+
ApplicationProvider,
21+
Button,
22+
Icon,
23+
IconRegistry,
24+
Layout,
25+
Text,
26+
} from 'react-native-ui-kitten';
27+
import {
28+
mapping,
29+
light as theme,
30+
} from '@eva-design/eva';
31+
import { EvaIconsPack } from '@ui-kitten/eva-icons';
32+
33+
/**
34+
* Use any valid `name` property from eva icons (e.g `github`, or `heart-outline`)
35+
* https://akveo.github.io/eva-icons
36+
*/
37+
const HeartIcon = (style: ImageStyle): React.ReactElement<ImageProps> => (
38+
<Icon {...style} name='heart'/>
39+
);
40+
41+
const App = (): React.ReactFragment => (
42+
<React.Fragment>
43+
<IconRegistry icons={EvaIconsPack}/>
44+
<ApplicationProvider mapping={mapping} theme={theme}>
45+
<Layout style={styles.container}>
46+
<Text style={styles.text} category='h1'>
47+
Welcome to UI Kitten 😻
48+
</Text>
49+
<Text style={styles.text} category='s1'>
50+
Start with editing App.js to configure your App
51+
</Text>
52+
<Text style={styles.text} appearance='hint'>
53+
For example, try changing theme to Dark by simply changing an import
54+
</Text>
55+
<Button style={styles.likeButton} icon={HeartIcon}>
56+
LIKE
57+
</Button>
58+
</Layout>
59+
</ApplicationProvider>
60+
</React.Fragment>
61+
);
62+
63+
const styles = StyleSheet.create({
64+
container: {
65+
flex: 1,
66+
justifyContent: 'center',
67+
alignItems: 'center',
68+
},
69+
text: {
70+
textAlign: 'center',
71+
},
72+
likeButton: {
73+
marginVertical: 16,
74+
},
75+
});
76+
77+
export default App;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
[android]
3+
target = Google Inc.:Google APIs:23
4+
5+
[maven_repositories]
6+
central = https://repo1.maven.org/maven2
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
root: true,
3+
extends: '@react-native-community',
4+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pbxproj -text
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# Xcode
6+
#
7+
build/
8+
*.pbxuser
9+
!default.pbxuser
10+
*.mode1v3
11+
!default.mode1v3
12+
*.mode2v3
13+
!default.mode2v3
14+
*.perspectivev3
15+
!default.perspectivev3
16+
xcuserdata
17+
*.xccheckout
18+
*.moved-aside
19+
DerivedData
20+
*.hmap
21+
*.ipa
22+
*.xcuserstate
23+
project.xcworkspace
24+
25+
# Android/IntelliJ
26+
#
27+
build/
28+
.idea
29+
.gradle
30+
local.properties
31+
*.iml
32+
33+
# Visual Studio Code
34+
#
35+
.vscode/
36+
37+
# node.js
38+
#
39+
node_modules/
40+
npm-debug.log
41+
yarn-error.log
42+
43+
# BUCK
44+
buck-out/
45+
\.buckd/
46+
*.keystore
47+
48+
# fastlane
49+
#
50+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
51+
# screenshots whenever they are needed.
52+
# For more information about the recommended setup visit:
53+
# https://docs.fastlane.tools/best-practices/source-control/
54+
55+
*/fastlane/report.xml
56+
*/fastlane/Preview.html
57+
*/fastlane/screenshots
58+
59+
# Bundle artifact
60+
*.jsbundle
61+
62+
# CocoaPods
63+
/ios/Pods/
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
bracketSpacing: false,
3+
jsxBracketSameLine: true,
4+
singleQuote: true,
5+
trailingComma: 'all',
6+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

0 commit comments

Comments
 (0)