-
Notifications
You must be signed in to change notification settings - Fork 1
/
rn_init.sh
executable file
·49 lines (37 loc) · 930 Bytes
/
rn_init.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh
if [ $# -eq 0 ]; then
echo 'Please input <project-name>'
exit
fi
PROJECT_NAME=$1
BASEDIR=$(dirname "$0")
echo 'create project:' $PROJECT_NAME '...'
# === init ===
react-native init $PROJECT_NAME
echo "# Vim\n*~\n*swp" >> $PROJECT_NAME/.gitignore
cp -rpf $BASEDIR/template/* $PROJECT_NAME
cd $PROJECT_NAME
# === npm ===
npm i lodash \
react-navigation \
react-native-elements \
react-native-vector-icons \
react-native-gesture-handler \
react-navigation-header-buttons \
react-native-storage \
react-native-keyboard-aware-scroll-view \
redux \
react-redux \
react-native-safari-view --save
react-native link
npm i react-native-stylus-transformer stylus --save
# [realm]
#npm i -g rnpm
#npm i realm --save
#rnpm link realm
# === debugger ===
brew update && brew cask install react-native-debugger
# === git ===
git init; git add .; git commit -m 'init'
# === done ===
echo "\n\ndone!"