Skip to content

Commit b2629bd

Browse files
author
Chris Brody
authored
Manual installation gone in generated README.md (#169)
* Manual installation gone in generated README.md * update test snapshots * [README.md] now generated by an expression function with some argument properties removed
1 parent f87079a commit b2629bd

File tree

33 files changed

+3
-695
lines changed

33 files changed

+3
-695
lines changed

templates/general.js

Lines changed: 3 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,7 @@
11
module.exports = [{
22
name: () => 'README.md',
3-
content: ({ moduleName, packageIdentifier, name, namespace, platforms }) => {
4-
let manualInstallation = '';
5-
6-
if (platforms.indexOf('ios') >= 0) {
7-
manualInstallation += `
8-
#### iOS
9-
10-
1. In XCode, in the project navigator, right click \`Libraries\` ➜ \`Add Files to [your project's name]\`
11-
2. Go to \`node_modules\` ➜ \`${moduleName}\` and add \`${name}.xcodeproj\`
12-
3. In XCode, in the project navigator, select your project. Add \`lib${name}.a\` to your project's \`Build Phases\` ➜ \`Link Binary With Libraries\`
13-
4. Run your project (\`Cmd+R\`)<
14-
`;
15-
}
16-
17-
if (platforms.indexOf('android') >= 0) {
18-
manualInstallation += `
19-
#### Android
20-
21-
1. Open up \`android/app/src/main/java/[...]/MainApplication.java\`
22-
- Add \`import ${packageIdentifier}.${name}Package;\` to the imports at the top of the file
23-
- Add \`new ${name}Package()\` to the list returned by the \`getPackages()\` method
24-
2. Append the following lines to \`android/settings.gradle\`:
25-
\`\`\`
26-
include ':${moduleName}'
27-
project(':${moduleName}').projectDir = new File(rootProject.projectDir, '../node_modules/${moduleName}/android')
28-
\`\`\`
29-
3. Insert the following lines inside the dependencies block in \`android/app/build.gradle\`:
30-
\`\`\`
31-
compile project(':${moduleName}')
32-
\`\`\`
33-
`;
34-
}
35-
36-
if (platforms.indexOf('windows') >= 0) {
37-
manualInstallation += `
38-
#### Windows
39-
[Read it! :D](https://github.com/ReactWindows/react-native)
40-
41-
1. In Visual Studio add the \`${name}.sln\` in \`node_modules/${moduleName}/windows/${name}.sln\` folder to their solution, reference from their app.
42-
2. Open up your \`MainPage.cs\` app
43-
- Add \`using ${namespace}.${name};\` to the usings at the top of the file
44-
- Add \`new ${name}Package()\` to the \`List<IReactPackage>\` returned by the \`Packages\` method
45-
`;
46-
}
47-
48-
return `# ${moduleName}
3+
content: ({ moduleName, name }) =>
4+
`# ${moduleName}
495
506
## Getting started
517
@@ -55,19 +11,14 @@ module.exports = [{
5511
5612
\`$ react-native link ${moduleName}\`
5713
58-
### Manual installation
59-
60-
${manualInstallation}
61-
6214
## Usage
6315
\`\`\`javascript
6416
import ${name} from '${moduleName}';
6517
6618
// TODO: What to do with the module?
6719
${name};
6820
\`\`\`
69-
`;
70-
},
21+
`,
7122
}, {
7223
name: () => 'package.json',
7324
content: ({ moduleName, platforms, githubAccount, authorName, authorEmail, license }) => {

tests/integration/cli/create/view/__snapshots__/cli-create-with-view.test.js.snap

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -69,32 +69,6 @@ buck-out/
6969
7070
\`$ react-native link react-native-integration-view-test-package\`
7171
72-
### Manual installation
73-
74-
75-
#### iOS
76-
77-
1. In XCode, in the project navigator, right click \`Libraries\`\`Add Files to [your project's name]\`
78-
2. Go to \`node_modules\`\`react-native-integration-view-test-package\` and add \`IntegrationViewTestPackage.xcodeproj\`
79-
3. In XCode, in the project navigator, select your project. Add \`libIntegrationViewTestPackage.a\` to your project's \`Build Phases\`\`Link Binary With Libraries\`
80-
4. Run your project (\`Cmd+R\`)<
81-
82-
#### Android
83-
84-
1. Open up \`android/app/src/main/java/[...]/MainApplication.java\`
85-
- Add \`import com.reactlibrary.IntegrationViewTestPackagePackage;\` to the imports at the top of the file
86-
- Add \`new IntegrationViewTestPackagePackage()\` to the list returned by the \`getPackages()\` method
87-
2. Append the following lines to \`android/settings.gradle\`:
88-
\`\`\`
89-
include ':react-native-integration-view-test-package'
90-
project(':react-native-integration-view-test-package').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-integration-view-test-package/android')
91-
\`\`\`
92-
3. Insert the following lines inside the dependencies block in \`android/app/build.gradle\`:
93-
\`\`\`
94-
compile project(':react-native-integration-view-test-package')
95-
\`\`\`
96-
97-
9872
## Usage
9973
\`\`\`javascript
10074
import IntegrationViewTestPackage from 'react-native-integration-view-test-package';

tests/integration/cli/create/with-defaults/__snapshots__/cli-create-with-defaults.test.js.snap

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -69,32 +69,6 @@ buck-out/
6969
7070
\`$ react-native link react-native-integration-test-package\`
7171
72-
### Manual installation
73-
74-
75-
#### iOS
76-
77-
1. In XCode, in the project navigator, right click \`Libraries\`\`Add Files to [your project's name]\`
78-
2. Go to \`node_modules\`\`react-native-integration-test-package\` and add \`IntegrationTestPackage.xcodeproj\`
79-
3. In XCode, in the project navigator, select your project. Add \`libIntegrationTestPackage.a\` to your project's \`Build Phases\`\`Link Binary With Libraries\`
80-
4. Run your project (\`Cmd+R\`)<
81-
82-
#### Android
83-
84-
1. Open up \`android/app/src/main/java/[...]/MainApplication.java\`
85-
- Add \`import com.reactlibrary.IntegrationTestPackagePackage;\` to the imports at the top of the file
86-
- Add \`new IntegrationTestPackagePackage()\` to the list returned by the \`getPackages()\` method
87-
2. Append the following lines to \`android/settings.gradle\`:
88-
\`\`\`
89-
include ':react-native-integration-test-package'
90-
project(':react-native-integration-test-package').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-integration-test-package/android')
91-
\`\`\`
92-
3. Insert the following lines inside the dependencies block in \`android/app/build.gradle\`:
93-
\`\`\`
94-
compile project(':react-native-integration-test-package')
95-
\`\`\`
96-
97-
9872
## Usage
9973
\`\`\`javascript
10074
import IntegrationTestPackage from 'react-native-integration-test-package';

tests/with-injection/create/view/with-defaults/__snapshots__/create-view-with-defaults.test.js.snap

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -49,32 +49,6 @@ content:
4949
5050
\`$ react-native link react-native-alice-bobbi\`
5151
52-
### Manual installation
53-
54-
55-
#### iOS
56-
57-
1. In XCode, in the project navigator, right click \`Libraries\`\`Add Files to [your project's name]\`
58-
2. Go to \`node_modules\`\`react-native-alice-bobbi\` and add \`AliceBobbi.xcodeproj\`
59-
3. In XCode, in the project navigator, select your project. Add \`libAliceBobbi.a\` to your project's \`Build Phases\`\`Link Binary With Libraries\`
60-
4. Run your project (\`Cmd+R\`)<
61-
62-
#### Android
63-
64-
1. Open up \`android/app/src/main/java/[...]/MainApplication.java\`
65-
- Add \`import com.reactlibrary.AliceBobbiPackage;\` to the imports at the top of the file
66-
- Add \`new AliceBobbiPackage()\` to the list returned by the \`getPackages()\` method
67-
2. Append the following lines to \`android/settings.gradle\`:
68-
\`\`\`
69-
include ':react-native-alice-bobbi'
70-
project(':react-native-alice-bobbi').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-alice-bobbi/android')
71-
\`\`\`
72-
3. Insert the following lines inside the dependencies block in \`android/app/build.gradle\`:
73-
\`\`\`
74-
compile project(':react-native-alice-bobbi')
75-
\`\`\`
76-
77-
7852
## Usage
7953
\`\`\`javascript
8054
import AliceBobbi from 'react-native-alice-bobbi';

tests/with-injection/create/view/with-example/with-defaults/__snapshots__/create-view-with-example-with-defaults.test.js.snap

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -53,32 +53,6 @@ content:
5353
5454
\`$ react-native link react-native-alice-bobbi\`
5555
56-
### Manual installation
57-
58-
59-
#### iOS
60-
61-
1. In XCode, in the project navigator, right click \`Libraries\`\`Add Files to [your project's name]\`
62-
2. Go to \`node_modules\`\`react-native-alice-bobbi\` and add \`AliceBobbi.xcodeproj\`
63-
3. In XCode, in the project navigator, select your project. Add \`libAliceBobbi.a\` to your project's \`Build Phases\`\`Link Binary With Libraries\`
64-
4. Run your project (\`Cmd+R\`)<
65-
66-
#### Android
67-
68-
1. Open up \`android/app/src/main/java/[...]/MainApplication.java\`
69-
- Add \`import com.reactlibrary.AliceBobbiPackage;\` to the imports at the top of the file
70-
- Add \`new AliceBobbiPackage()\` to the list returned by the \`getPackages()\` method
71-
2. Append the following lines to \`android/settings.gradle\`:
72-
\`\`\`
73-
include ':react-native-alice-bobbi'
74-
project(':react-native-alice-bobbi').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-alice-bobbi/android')
75-
\`\`\`
76-
3. Insert the following lines inside the dependencies block in \`android/app/build.gradle\`:
77-
\`\`\`
78-
compile project(':react-native-alice-bobbi')
79-
\`\`\`
80-
81-
8256
## Usage
8357
\`\`\`javascript
8458
import AliceBobbi from 'react-native-alice-bobbi';

tests/with-injection/create/view/with-example/with-options/__snapshots__/create-view-with-example-with-options.test.js.snap

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -53,32 +53,6 @@ content:
5353
5454
\`$ react-native link react-native-alice-bobbi\`
5555
56-
### Manual installation
57-
58-
59-
#### iOS
60-
61-
1. In XCode, in the project navigator, right click \`Libraries\`\`Add Files to [your project's name]\`
62-
2. Go to \`node_modules\`\`react-native-alice-bobbi\` and add \`AliceBobbi.xcodeproj\`
63-
3. In XCode, in the project navigator, select your project. Add \`libAliceBobbi.a\` to your project's \`Build Phases\`\`Link Binary With Libraries\`
64-
4. Run your project (\`Cmd+R\`)<
65-
66-
#### Android
67-
68-
1. Open up \`android/app/src/main/java/[...]/MainApplication.java\`
69-
- Add \`import com.reactlibrary.AliceBobbiPackage;\` to the imports at the top of the file
70-
- Add \`new AliceBobbiPackage()\` to the list returned by the \`getPackages()\` method
71-
2. Append the following lines to \`android/settings.gradle\`:
72-
\`\`\`
73-
include ':react-native-alice-bobbi'
74-
project(':react-native-alice-bobbi').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-alice-bobbi/android')
75-
\`\`\`
76-
3. Insert the following lines inside the dependencies block in \`android/app/build.gradle\`:
77-
\`\`\`
78-
compile project(':react-native-alice-bobbi')
79-
\`\`\`
80-
81-
8256
## Usage
8357
\`\`\`javascript
8458
import AliceBobbi from 'react-native-alice-bobbi';

tests/with-injection/create/view/with-options/for-android/__snapshots__/lib-view-android-config-options.test.js.snap

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,6 @@ content:
3939
4040
\`$ react-native link react-native-alice-bobbi\`
4141
42-
### Manual installation
43-
44-
45-
#### Android
46-
47-
1. Open up \`android/app/src/main/java/[...]/MainApplication.java\`
48-
- Add \`import com.reactlibrary.AliceBobbiPackage;\` to the imports at the top of the file
49-
- Add \`new AliceBobbiPackage()\` to the list returned by the \`getPackages()\` method
50-
2. Append the following lines to \`android/settings.gradle\`:
51-
\`\`\`
52-
include ':react-native-alice-bobbi'
53-
project(':react-native-alice-bobbi').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-alice-bobbi/android')
54-
\`\`\`
55-
3. Insert the following lines inside the dependencies block in \`android/app/build.gradle\`:
56-
\`\`\`
57-
compile project(':react-native-alice-bobbi')
58-
\`\`\`
59-
60-
6142
## Usage
6243
\`\`\`javascript
6344
import AliceBobbi from 'react-native-alice-bobbi';

tests/with-injection/create/view/with-options/for-ios/__snapshots__/create-view-with-options-for-ios.test.js.snap

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,6 @@ content:
3939
4040
\`$ react-native link react-native-alice-bobbi\`
4141
42-
### Manual installation
43-
44-
45-
#### iOS
46-
47-
1. In XCode, in the project navigator, right click \`Libraries\`\`Add Files to [your project's name]\`
48-
2. Go to \`node_modules\`\`react-native-alice-bobbi\` and add \`AliceBobbi.xcodeproj\`
49-
3. In XCode, in the project navigator, select your project. Add \`libAliceBobbi.a\` to your project's \`Build Phases\`\`Link Binary With Libraries\`
50-
4. Run your project (\`Cmd+R\`)<
51-
52-
5342
## Usage
5443
\`\`\`javascript
5544
import AliceBobbi from 'react-native-alice-bobbi';

tests/with-injection/create/with-defaults/__snapshots__/create-with-defaults.test.js.snap

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -49,32 +49,6 @@ content:
4949
5050
\`$ react-native link react-native-alice-bobbi\`
5151
52-
### Manual installation
53-
54-
55-
#### iOS
56-
57-
1. In XCode, in the project navigator, right click \`Libraries\`\`Add Files to [your project's name]\`
58-
2. Go to \`node_modules\`\`react-native-alice-bobbi\` and add \`AliceBobbi.xcodeproj\`
59-
3. In XCode, in the project navigator, select your project. Add \`libAliceBobbi.a\` to your project's \`Build Phases\`\`Link Binary With Libraries\`
60-
4. Run your project (\`Cmd+R\`)<
61-
62-
#### Android
63-
64-
1. Open up \`android/app/src/main/java/[...]/MainApplication.java\`
65-
- Add \`import com.reactlibrary.AliceBobbiPackage;\` to the imports at the top of the file
66-
- Add \`new AliceBobbiPackage()\` to the list returned by the \`getPackages()\` method
67-
2. Append the following lines to \`android/settings.gradle\`:
68-
\`\`\`
69-
include ':react-native-alice-bobbi'
70-
project(':react-native-alice-bobbi').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-alice-bobbi/android')
71-
\`\`\`
72-
3. Insert the following lines inside the dependencies block in \`android/app/build.gradle\`:
73-
\`\`\`
74-
compile project(':react-native-alice-bobbi')
75-
\`\`\`
76-
77-
7852
## Usage
7953
\`\`\`javascript
8054
import AliceBobbi from 'react-native-alice-bobbi';

tests/with-injection/create/with-defaults/bogus-platforms/bogus-name/__snapshots__/bogus-platforms-name.test.js.snap

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ content:
2929
3030
\`$ react-native link react-native-alice-bobbi\`
3131
32-
### Manual installation
33-
34-
35-
3632
## Usage
3733
\`\`\`javascript
3834
import AliceBobbi from 'react-native-alice-bobbi';

0 commit comments

Comments
 (0)