@nx/react-native 17.0.0-beta.8 → 17.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +9 -9
- package/src/executors/build-android/build-android.impl.js +1 -7
- package/src/executors/build-android/build-android.impl.ts +1 -7
- package/src/executors/build-ios/build-ios.impl.js +3 -2
- package/src/executors/build-ios/build-ios.impl.ts +3 -6
- package/src/executors/run-android/run-android.impl.js +5 -3
- package/src/executors/run-android/run-android.impl.ts +5 -7
- package/src/executors/run-android/schema.json +0 -11
- package/src/executors/run-ios/run-ios.impl.js +3 -3
- package/src/executors/run-ios/run-ios.impl.ts +3 -7
- package/src/executors/run-ios/schema.json +0 -17
- package/src/generators/application/application.spec.ts +9 -9
- package/src/generators/application/files/app/metro.config.js.template +1 -1
- package/src/generators/application/lib/{nomalize-options.spec.ts → normalize-options.spec.ts} +5 -5
- package/src/generators/component/component.js +1 -1
- package/src/generators/component/lib/normalize-options.d.ts +1 -0
- package/src/generators/component/lib/normalize-options.js +1 -0
- package/src/generators/library/library.spec.ts +28 -13
- package/src/generators/stories/schema.json +3 -0
- package/src/generators/storybook-configuration/schema.json +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/react-native",
|
|
3
|
-
"version": "17.0.0-
|
|
3
|
+
"version": "17.0.0-rc.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for React Native contains generators for managing React Native applications and libraries within an Nx workspace. It provides: \n\n-Integration with libraries such as Jest, Detox, and Storybook.\n-Scaffolding for creating buildable libraries that can be published to npm.\n-Utilities for automatic workspace refactoring.",
|
|
6
6
|
"keywords": [
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
"node-fetch": "^2.6.7",
|
|
37
37
|
"tsconfig-paths": "^4.1.2",
|
|
38
38
|
"tslib": "^2.3.0",
|
|
39
|
-
"@nx/detox": "17.0.0-
|
|
40
|
-
"@nx/devkit": "17.0.0-
|
|
41
|
-
"@nx/jest": "17.0.0-
|
|
42
|
-
"@nx/js": "17.0.0-
|
|
43
|
-
"@nx/eslint": "17.0.0-
|
|
44
|
-
"@nx/react": "17.0.0-
|
|
45
|
-
"@nx/workspace": "17.0.0-
|
|
46
|
-
"@nrwl/react-native": "17.0.0-
|
|
39
|
+
"@nx/detox": "17.0.0-rc.1",
|
|
40
|
+
"@nx/devkit": "17.0.0-rc.1",
|
|
41
|
+
"@nx/jest": "17.0.0-rc.1",
|
|
42
|
+
"@nx/js": "17.0.0-rc.1",
|
|
43
|
+
"@nx/eslint": "17.0.0-rc.1",
|
|
44
|
+
"@nx/react": "17.0.0-rc.1",
|
|
45
|
+
"@nx/workspace": "17.0.0-rc.1",
|
|
46
|
+
"@nrwl/react-native": "17.0.0-rc.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"react-native": ">= 0.72.0 < 0.73.0"
|
|
@@ -46,13 +46,7 @@ function runCliBuild(workspaceRoot, projectRoot, options) {
|
|
|
46
46
|
});
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
const nxOptions = ['sync', 'packager'];
|
|
50
49
|
const startOptions = ['port', 'resetCache'];
|
|
51
|
-
const deprecatedOptions = ['apk', 'debug', 'gradleTask'];
|
|
52
50
|
function createBuildAndroidOptions(options) {
|
|
53
|
-
return (0, get_cli_options_1.getCliOptions)(options,
|
|
54
|
-
...nxOptions,
|
|
55
|
-
...startOptions,
|
|
56
|
-
...deprecatedOptions,
|
|
57
|
-
]);
|
|
51
|
+
return (0, get_cli_options_1.getCliOptions)(options, startOptions);
|
|
58
52
|
}
|
|
@@ -66,14 +66,8 @@ function runCliBuild(
|
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
const nxOptions = ['sync', 'packager'];
|
|
70
69
|
const startOptions = ['port', 'resetCache'];
|
|
71
|
-
const deprecatedOptions = ['apk', 'debug', 'gradleTask'];
|
|
72
70
|
|
|
73
71
|
function createBuildAndroidOptions(options: ReactNativeBuildAndroidOptions) {
|
|
74
|
-
return getCliOptions<ReactNativeBuildAndroidOptions>(options,
|
|
75
|
-
...nxOptions,
|
|
76
|
-
...startOptions,
|
|
77
|
-
...deprecatedOptions,
|
|
78
|
-
]);
|
|
72
|
+
return getCliOptions<ReactNativeBuildAndroidOptions>(options, startOptions);
|
|
79
73
|
}
|
|
@@ -47,8 +47,9 @@ function runCliBuildIOS(workspaceRoot, projectRoot, options) {
|
|
|
47
47
|
});
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
const nxOptions = ['sync', 'install', 'packager'];
|
|
51
50
|
const startOptions = ['port', 'resetCache'];
|
|
52
51
|
function createBuildIOSOptions(options) {
|
|
53
|
-
return (0, get_cli_options_1.getCliOptions)(options,
|
|
52
|
+
return (0, get_cli_options_1.getCliOptions)(options, startOptions, [
|
|
53
|
+
'buildFolder',
|
|
54
|
+
]);
|
|
54
55
|
}
|
|
@@ -68,13 +68,10 @@ function runCliBuildIOS(
|
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
const nxOptions = ['sync', 'install', 'packager'];
|
|
72
71
|
const startOptions = ['port', 'resetCache'];
|
|
73
72
|
|
|
74
73
|
function createBuildIOSOptions(options: ReactNativeBuildIosOptions) {
|
|
75
|
-
return getCliOptions<ReactNativeBuildIosOptions>(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
['buildFolder']
|
|
79
|
-
);
|
|
74
|
+
return getCliOptions<ReactNativeBuildIosOptions>(options, startOptions, [
|
|
75
|
+
'buildFolder',
|
|
76
|
+
]);
|
|
80
77
|
}
|
|
@@ -68,9 +68,11 @@ function runCliRunAndroid(workspaceRoot, projectRoot, options) {
|
|
|
68
68
|
});
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
-
const nxOptions = ['sync', 'packager'];
|
|
72
71
|
const startOptions = ['port', 'resetCache'];
|
|
73
|
-
const deprecatedOptions = ['variant', 'jetifier'];
|
|
74
72
|
function createRunAndroidOptions(options) {
|
|
75
|
-
return (0, get_cli_options_1.getCliOptions)(options,
|
|
73
|
+
return (0, get_cli_options_1.getCliOptions)(options, startOptions, [
|
|
74
|
+
'appId',
|
|
75
|
+
'appIdSuffix',
|
|
76
|
+
'deviceId',
|
|
77
|
+
]);
|
|
76
78
|
}
|
|
@@ -92,14 +92,12 @@ function runCliRunAndroid(
|
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
const nxOptions = ['sync', 'packager'];
|
|
96
95
|
const startOptions = ['port', 'resetCache'];
|
|
97
|
-
const deprecatedOptions = ['variant', 'jetifier'];
|
|
98
96
|
|
|
99
97
|
function createRunAndroidOptions(options: ReactNativeRunAndroidOptions) {
|
|
100
|
-
return getCliOptions<ReactNativeRunAndroidOptions>(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
);
|
|
98
|
+
return getCliOptions<ReactNativeRunAndroidOptions>(options, startOptions, [
|
|
99
|
+
'appId',
|
|
100
|
+
'appIdSuffix',
|
|
101
|
+
'deviceId',
|
|
102
|
+
]);
|
|
105
103
|
}
|
|
@@ -54,11 +54,6 @@
|
|
|
54
54
|
"examples": ["debug", "release"],
|
|
55
55
|
"x-priority": "important"
|
|
56
56
|
},
|
|
57
|
-
"packager": {
|
|
58
|
-
"type": "boolean",
|
|
59
|
-
"description": "Launch packager while building",
|
|
60
|
-
"default": true
|
|
61
|
-
},
|
|
62
57
|
"port": {
|
|
63
58
|
"type": "number",
|
|
64
59
|
"description": "The port where the packager server is listening on.",
|
|
@@ -95,12 +90,6 @@
|
|
|
95
90
|
"type": "boolean",
|
|
96
91
|
"description": "Explicitly select build type and flavour to use before running a build"
|
|
97
92
|
},
|
|
98
|
-
"sync": {
|
|
99
|
-
"type": "boolean",
|
|
100
|
-
"description": "Syncs npm dependencies to `package.json` (for React Native autolink).",
|
|
101
|
-
"x-deprecated": "Add sync-deps to dependsOn for this target in project.json instead",
|
|
102
|
-
"default": true
|
|
103
|
-
},
|
|
104
93
|
"resetCache": {
|
|
105
94
|
"type": "boolean",
|
|
106
95
|
"description": "Resets metro cache.",
|
|
@@ -69,9 +69,9 @@ function runCliRunIOS(workspaceRoot, projectRoot, options) {
|
|
|
69
69
|
});
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
-
const nxOptions = ['sync', 'install', 'packager'];
|
|
73
72
|
const startOptions = ['port', 'resetCache'];
|
|
74
|
-
const deprecatedOptions = ['xcodeConfiguration'];
|
|
75
73
|
function createRunIOSOptions(options) {
|
|
76
|
-
return (0, get_cli_options_1.getCliOptions)(options,
|
|
74
|
+
return (0, get_cli_options_1.getCliOptions)(options, startOptions, [
|
|
75
|
+
'buildFolder',
|
|
76
|
+
]);
|
|
77
77
|
}
|
|
@@ -92,14 +92,10 @@ function runCliRunIOS(
|
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
const nxOptions = ['sync', 'install', 'packager'];
|
|
96
95
|
const startOptions = ['port', 'resetCache'];
|
|
97
|
-
const deprecatedOptions = ['xcodeConfiguration'];
|
|
98
96
|
|
|
99
97
|
function createRunIOSOptions(options: ReactNativeRunIosOptions) {
|
|
100
|
-
return getCliOptions<ReactNativeRunIosOptions>(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
['buildFolder']
|
|
104
|
-
);
|
|
98
|
+
return getCliOptions<ReactNativeRunIosOptions>(options, startOptions, [
|
|
99
|
+
'buildFolder',
|
|
100
|
+
]);
|
|
105
101
|
}
|
|
@@ -82,28 +82,11 @@
|
|
|
82
82
|
],
|
|
83
83
|
"description": "Custom params that will be passed to xcodebuild command."
|
|
84
84
|
},
|
|
85
|
-
"install": {
|
|
86
|
-
"type": "boolean",
|
|
87
|
-
"description": "Runs `pod install` for native modules before building iOS app.",
|
|
88
|
-
"default": true,
|
|
89
|
-
"x-deprecated": "Add `pod-install` to dependsOn for this target in project.json instead."
|
|
90
|
-
},
|
|
91
|
-
"sync": {
|
|
92
|
-
"type": "boolean",
|
|
93
|
-
"description": "Syncs npm dependencies to `package.json` (for React Native autolink).",
|
|
94
|
-
"x-deprecated": "Add `sync-deps` to dependsOn for this target in project.json instead.",
|
|
95
|
-
"default": true
|
|
96
|
-
},
|
|
97
85
|
"resetCache": {
|
|
98
86
|
"type": "boolean",
|
|
99
87
|
"description": "Resets metro cache.",
|
|
100
88
|
"default": false
|
|
101
89
|
},
|
|
102
|
-
"packager": {
|
|
103
|
-
"type": "boolean",
|
|
104
|
-
"description": "Launch packager while building",
|
|
105
|
-
"default": true
|
|
106
|
-
},
|
|
107
90
|
"binaryPath": {
|
|
108
91
|
"type": "string",
|
|
109
92
|
"description": "Path relative to project root where pre-built .app binary lives."
|
|
@@ -18,7 +18,7 @@ describe('app', () => {
|
|
|
18
18
|
|
|
19
19
|
it('should update configuration', async () => {
|
|
20
20
|
await reactNativeApplicationGenerator(appTree, {
|
|
21
|
-
name: '
|
|
21
|
+
name: 'my-app',
|
|
22
22
|
displayName: 'myApp',
|
|
23
23
|
linter: Linter.EsLint,
|
|
24
24
|
e2eTestRunner: 'none',
|
|
@@ -32,7 +32,7 @@ describe('app', () => {
|
|
|
32
32
|
|
|
33
33
|
it('should update nx.json', async () => {
|
|
34
34
|
await reactNativeApplicationGenerator(appTree, {
|
|
35
|
-
name: '
|
|
35
|
+
name: 'my-app',
|
|
36
36
|
displayName: 'myApp',
|
|
37
37
|
tags: 'one,two',
|
|
38
38
|
linter: Linter.EsLint,
|
|
@@ -49,7 +49,7 @@ describe('app', () => {
|
|
|
49
49
|
|
|
50
50
|
it('should generate files', async () => {
|
|
51
51
|
await reactNativeApplicationGenerator(appTree, {
|
|
52
|
-
name: '
|
|
52
|
+
name: 'my-app',
|
|
53
53
|
displayName: 'myApp',
|
|
54
54
|
linter: Linter.EsLint,
|
|
55
55
|
e2eTestRunner: 'none',
|
|
@@ -82,7 +82,7 @@ describe('app', () => {
|
|
|
82
82
|
|
|
83
83
|
it('should generate targets', async () => {
|
|
84
84
|
await reactNativeApplicationGenerator(appTree, {
|
|
85
|
-
name: '
|
|
85
|
+
name: 'my-app',
|
|
86
86
|
displayName: 'myApp',
|
|
87
87
|
linter: Linter.EsLint,
|
|
88
88
|
e2eTestRunner: 'none',
|
|
@@ -97,7 +97,7 @@ describe('app', () => {
|
|
|
97
97
|
appTree.rename('tsconfig.base.json', 'tsconfig.json');
|
|
98
98
|
|
|
99
99
|
await reactNativeApplicationGenerator(appTree, {
|
|
100
|
-
name: '
|
|
100
|
+
name: 'my-app',
|
|
101
101
|
displayName: 'myApp',
|
|
102
102
|
linter: Linter.EsLint,
|
|
103
103
|
e2eTestRunner: 'none',
|
|
@@ -112,8 +112,8 @@ describe('app', () => {
|
|
|
112
112
|
describe('detox', () => {
|
|
113
113
|
it('should create e2e app with directory', async () => {
|
|
114
114
|
await reactNativeApplicationGenerator(appTree, {
|
|
115
|
-
name: '
|
|
116
|
-
directory: '
|
|
115
|
+
name: 'my-app',
|
|
116
|
+
directory: 'my-dir',
|
|
117
117
|
linter: Linter.EsLint,
|
|
118
118
|
e2eTestRunner: 'detox',
|
|
119
119
|
install: false,
|
|
@@ -163,7 +163,7 @@ describe('app', () => {
|
|
|
163
163
|
|
|
164
164
|
it('should create e2e app without directory', async () => {
|
|
165
165
|
await reactNativeApplicationGenerator(appTree, {
|
|
166
|
-
name: '
|
|
166
|
+
name: 'my-app',
|
|
167
167
|
linter: Linter.EsLint,
|
|
168
168
|
e2eTestRunner: 'detox',
|
|
169
169
|
install: false,
|
|
@@ -216,7 +216,7 @@ describe('app', () => {
|
|
|
216
216
|
const packageJsonBefore = readJson(appTree, 'package.json');
|
|
217
217
|
|
|
218
218
|
await reactNativeApplicationGenerator(appTree, {
|
|
219
|
-
name: '
|
|
219
|
+
name: 'my-app',
|
|
220
220
|
displayName: 'myApp',
|
|
221
221
|
linter: Linter.EsLint,
|
|
222
222
|
e2eTestRunner: 'none',
|
|
@@ -19,7 +19,7 @@ const customConfig = {
|
|
|
19
19
|
assetExts: assetExts.filter((ext) => ext !== 'svg'),
|
|
20
20
|
sourceExts: [...sourceExts, 'svg'],
|
|
21
21
|
blockList: exclusionList([/^(?!.*node_modules).*\/dist\/.*/]),
|
|
22
|
-
unstable_enableSymlinks: true,
|
|
22
|
+
// unstable_enableSymlinks: true,
|
|
23
23
|
// unstable_enablePackageExports: true,
|
|
24
24
|
},
|
|
25
25
|
};
|
package/src/generators/application/lib/{nomalize-options.spec.ts → normalize-options.spec.ts}
RENAMED
|
@@ -48,15 +48,15 @@ describe('Normalize Options', () => {
|
|
|
48
48
|
};
|
|
49
49
|
const options = await normalizeOptions(appTree, schema);
|
|
50
50
|
expect(options).toEqual({
|
|
51
|
-
androidProjectRoot: '
|
|
52
|
-
appProjectRoot: '
|
|
51
|
+
androidProjectRoot: 'myApp/android',
|
|
52
|
+
appProjectRoot: 'myApp',
|
|
53
53
|
className: 'MyApp',
|
|
54
54
|
displayName: 'MyApp',
|
|
55
|
-
iosProjectRoot: '
|
|
55
|
+
iosProjectRoot: 'myApp/ios',
|
|
56
56
|
lowerCaseName: 'myapp',
|
|
57
|
-
name: '
|
|
57
|
+
name: 'myApp',
|
|
58
58
|
parsedTags: [],
|
|
59
|
-
projectName: '
|
|
59
|
+
projectName: 'myApp',
|
|
60
60
|
projectNameAndRootFormat: 'as-provided',
|
|
61
61
|
entryFile: 'src/main.tsx',
|
|
62
62
|
e2eTestRunner: 'none',
|
|
@@ -44,7 +44,7 @@ function addExportsToBarrel(host, options) {
|
|
|
44
44
|
tsModule = (0, ensure_typescript_1.ensureTypescript)();
|
|
45
45
|
}
|
|
46
46
|
const workspace = (0, devkit_1.getProjects)(host);
|
|
47
|
-
const isApp = workspace.get(options.
|
|
47
|
+
const isApp = workspace.get(options.projectName).projectType === 'application';
|
|
48
48
|
if (options.export && !isApp) {
|
|
49
49
|
const indexFilePath = (0, devkit_1.joinPathFragments)(options.projectSourceRoot, options.js ? 'index.js' : 'index.ts');
|
|
50
50
|
const indexSource = host.read(indexFilePath, 'utf-8');
|
|
@@ -13,7 +13,7 @@ describe('lib', () => {
|
|
|
13
13
|
let appTree: Tree;
|
|
14
14
|
|
|
15
15
|
const defaultSchema: Schema = {
|
|
16
|
-
name: '
|
|
16
|
+
name: 'my-lib',
|
|
17
17
|
linter: Linter.EsLint,
|
|
18
18
|
skipFormat: false,
|
|
19
19
|
skipTsConfig: false,
|
|
@@ -124,7 +124,7 @@ describe('lib', () => {
|
|
|
124
124
|
it('should update nx.json', async () => {
|
|
125
125
|
await libraryGenerator(appTree, {
|
|
126
126
|
...defaultSchema,
|
|
127
|
-
directory: '
|
|
127
|
+
directory: 'my-dir',
|
|
128
128
|
tags: 'one',
|
|
129
129
|
});
|
|
130
130
|
|
|
@@ -135,8 +135,8 @@ describe('lib', () => {
|
|
|
135
135
|
|
|
136
136
|
await libraryGenerator(appTree, {
|
|
137
137
|
...defaultSchema,
|
|
138
|
-
name: '
|
|
139
|
-
directory: '
|
|
138
|
+
name: 'my-lib2',
|
|
139
|
+
directory: 'my-dir2',
|
|
140
140
|
tags: 'one,two',
|
|
141
141
|
});
|
|
142
142
|
|
|
@@ -150,7 +150,10 @@ describe('lib', () => {
|
|
|
150
150
|
});
|
|
151
151
|
|
|
152
152
|
it('should update project.json', async () => {
|
|
153
|
-
await libraryGenerator(appTree, {
|
|
153
|
+
await libraryGenerator(appTree, {
|
|
154
|
+
...defaultSchema,
|
|
155
|
+
directory: 'my-dir',
|
|
156
|
+
});
|
|
154
157
|
const projectConfiguration = readProjectConfiguration(appTree, 'my-lib');
|
|
155
158
|
|
|
156
159
|
expect(projectConfiguration.root).toEqual('my-dir');
|
|
@@ -164,7 +167,10 @@ describe('lib', () => {
|
|
|
164
167
|
});
|
|
165
168
|
|
|
166
169
|
it('should update root tsconfig.base.json', async () => {
|
|
167
|
-
await libraryGenerator(appTree, {
|
|
170
|
+
await libraryGenerator(appTree, {
|
|
171
|
+
...defaultSchema,
|
|
172
|
+
directory: 'my-dir',
|
|
173
|
+
});
|
|
168
174
|
const tsconfigJson = readJson(appTree, '/tsconfig.base.json');
|
|
169
175
|
expect(tsconfigJson.compilerOptions.paths['@proj/my-lib']).toEqual([
|
|
170
176
|
'my-dir/src/index.ts',
|
|
@@ -177,7 +183,10 @@ describe('lib', () => {
|
|
|
177
183
|
it('should update root tsconfig.json when no tsconfig.base.json', async () => {
|
|
178
184
|
appTree.rename('tsconfig.base.json', 'tsconfig.json');
|
|
179
185
|
|
|
180
|
-
await libraryGenerator(appTree, {
|
|
186
|
+
await libraryGenerator(appTree, {
|
|
187
|
+
...defaultSchema,
|
|
188
|
+
directory: 'my-dir',
|
|
189
|
+
});
|
|
181
190
|
|
|
182
191
|
const tsconfigJson = readJson(appTree, '/tsconfig.json');
|
|
183
192
|
expect(tsconfigJson.compilerOptions.paths['@proj/my-lib']).toEqual([
|
|
@@ -189,7 +198,10 @@ describe('lib', () => {
|
|
|
189
198
|
});
|
|
190
199
|
|
|
191
200
|
it('should create a local tsconfig.json', async () => {
|
|
192
|
-
await libraryGenerator(appTree, {
|
|
201
|
+
await libraryGenerator(appTree, {
|
|
202
|
+
...defaultSchema,
|
|
203
|
+
directory: 'my-dir',
|
|
204
|
+
});
|
|
193
205
|
|
|
194
206
|
const tsconfigJson = readJson(appTree, 'my-dir/tsconfig.json');
|
|
195
207
|
expect(tsconfigJson.extends).toBe('../tsconfig.base.json');
|
|
@@ -206,7 +218,10 @@ describe('lib', () => {
|
|
|
206
218
|
it('should extend from root tsconfig.json when no tsconfig.base.json', async () => {
|
|
207
219
|
appTree.rename('tsconfig.base.json', 'tsconfig.json');
|
|
208
220
|
|
|
209
|
-
await libraryGenerator(appTree, {
|
|
221
|
+
await libraryGenerator(appTree, {
|
|
222
|
+
...defaultSchema,
|
|
223
|
+
directory: 'my-dir',
|
|
224
|
+
});
|
|
210
225
|
|
|
211
226
|
const tsconfigJson = readJson(appTree, 'my-dir/tsconfig.json');
|
|
212
227
|
expect(tsconfigJson.extends).toBe('../tsconfig.json');
|
|
@@ -343,7 +358,7 @@ describe('lib', () => {
|
|
|
343
358
|
try {
|
|
344
359
|
await libraryGenerator(appTree, {
|
|
345
360
|
...defaultSchema,
|
|
346
|
-
directory: '
|
|
361
|
+
directory: 'my-dir',
|
|
347
362
|
publishable: true,
|
|
348
363
|
});
|
|
349
364
|
} catch (e) {
|
|
@@ -382,7 +397,7 @@ describe('lib', () => {
|
|
|
382
397
|
await libraryGenerator(appTree, {
|
|
383
398
|
...defaultSchema,
|
|
384
399
|
publishable: true,
|
|
385
|
-
directory: '
|
|
400
|
+
directory: 'my-dir',
|
|
386
401
|
importPath: '@myorg/lib',
|
|
387
402
|
});
|
|
388
403
|
const packageJson = readJson(appTree, 'my-dir/package.json');
|
|
@@ -397,7 +412,7 @@ describe('lib', () => {
|
|
|
397
412
|
it('should fail if the same importPath has already been used', async () => {
|
|
398
413
|
await libraryGenerator(appTree, {
|
|
399
414
|
...defaultSchema,
|
|
400
|
-
name: '
|
|
415
|
+
name: 'my-lib1',
|
|
401
416
|
publishable: true,
|
|
402
417
|
importPath: '@myorg/lib',
|
|
403
418
|
});
|
|
@@ -405,7 +420,7 @@ describe('lib', () => {
|
|
|
405
420
|
try {
|
|
406
421
|
await libraryGenerator(appTree, {
|
|
407
422
|
...defaultSchema,
|
|
408
|
-
name: '
|
|
423
|
+
name: 'my-lib2',
|
|
409
424
|
publishable: true,
|
|
410
425
|
importPath: '@myorg/lib',
|
|
411
426
|
});
|