bugfix(react-native): change to entryFile absoluste path (#7953)
This commit is contained in:
parent
1aec1124e6
commit
49df712d5f
@ -55,7 +55,7 @@ describe('react native', () => {
|
|||||||
expect(() =>
|
expect(() =>
|
||||||
checkFilesExist(`dist/apps/${appName}/android/main.jsbundle`)
|
checkFilesExist(`dist/apps/${appName}/android/main.jsbundle`)
|
||||||
).not.toThrow();
|
).not.toThrow();
|
||||||
});
|
}, 1000000);
|
||||||
|
|
||||||
xit('should support create application with js', async () => {
|
xit('should support create application with js', async () => {
|
||||||
const appName = uniq('my-app');
|
const appName = uniq('my-app');
|
||||||
|
|||||||
@ -214,7 +214,7 @@
|
|||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "set -e\n\nexport NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh <%= entryFile %>\n";
|
shellScript = "set -e\n\nexport NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh <%= entryFileAbsolutePath %>\n";
|
||||||
};
|
};
|
||||||
02884E84544B8E84B8B8F340 /* [CP] Embed Pods Frameworks */ = {
|
02884E84544B8E84B8B8F340 /* [CP] Embed Pods Frameworks */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
|||||||
@ -30,6 +30,7 @@ describe('Normalize Options', () => {
|
|||||||
projectName: 'my-app',
|
projectName: 'my-app',
|
||||||
linter: Linter.EsLint,
|
linter: Linter.EsLint,
|
||||||
entryFile: 'apps/my-app/src/main.tsx',
|
entryFile: 'apps/my-app/src/main.tsx',
|
||||||
|
entryFileAbsolutePath: '/virtual/apps/my-app/src/main.tsx',
|
||||||
e2eTestRunner: 'none',
|
e2eTestRunner: 'none',
|
||||||
unitTestRunner: 'jest',
|
unitTestRunner: 'jest',
|
||||||
});
|
});
|
||||||
@ -52,6 +53,7 @@ describe('Normalize Options', () => {
|
|||||||
parsedTags: [],
|
parsedTags: [],
|
||||||
projectName: 'my-app',
|
projectName: 'my-app',
|
||||||
entryFile: 'apps/my-app/src/main.tsx',
|
entryFile: 'apps/my-app/src/main.tsx',
|
||||||
|
entryFileAbsolutePath: '/virtual/apps/my-app/src/main.tsx',
|
||||||
e2eTestRunner: 'none',
|
e2eTestRunner: 'none',
|
||||||
unitTestRunner: 'jest',
|
unitTestRunner: 'jest',
|
||||||
});
|
});
|
||||||
@ -76,6 +78,7 @@ describe('Normalize Options', () => {
|
|||||||
parsedTags: [],
|
parsedTags: [],
|
||||||
projectName: 'directory-my-app',
|
projectName: 'directory-my-app',
|
||||||
entryFile: 'apps/directory/my-app/src/main.tsx',
|
entryFile: 'apps/directory/my-app/src/main.tsx',
|
||||||
|
entryFileAbsolutePath: '/virtual/apps/directory/my-app/src/main.tsx',
|
||||||
e2eTestRunner: 'none',
|
e2eTestRunner: 'none',
|
||||||
unitTestRunner: 'jest',
|
unitTestRunner: 'jest',
|
||||||
});
|
});
|
||||||
@ -98,6 +101,7 @@ describe('Normalize Options', () => {
|
|||||||
parsedTags: [],
|
parsedTags: [],
|
||||||
projectName: 'directory-my-app',
|
projectName: 'directory-my-app',
|
||||||
entryFile: 'apps/directory/my-app/src/main.tsx',
|
entryFile: 'apps/directory/my-app/src/main.tsx',
|
||||||
|
entryFileAbsolutePath: '/virtual/apps/directory/my-app/src/main.tsx',
|
||||||
e2eTestRunner: 'none',
|
e2eTestRunner: 'none',
|
||||||
unitTestRunner: 'jest',
|
unitTestRunner: 'jest',
|
||||||
});
|
});
|
||||||
@ -121,6 +125,7 @@ describe('Normalize Options', () => {
|
|||||||
parsedTags: [],
|
parsedTags: [],
|
||||||
projectName: 'my-app',
|
projectName: 'my-app',
|
||||||
entryFile: 'apps/my-app/src/main.tsx',
|
entryFile: 'apps/my-app/src/main.tsx',
|
||||||
|
entryFileAbsolutePath: '/virtual/apps/my-app/src/main.tsx',
|
||||||
e2eTestRunner: 'none',
|
e2eTestRunner: 'none',
|
||||||
unitTestRunner: 'jest',
|
unitTestRunner: 'jest',
|
||||||
});
|
});
|
||||||
|
|||||||
@ -11,6 +11,7 @@ export interface NormalizedSchema extends Schema {
|
|||||||
androidProjectRoot: string;
|
androidProjectRoot: string;
|
||||||
parsedTags: string[];
|
parsedTags: string[];
|
||||||
entryFile: string;
|
entryFile: string;
|
||||||
|
entryFileAbsolutePath: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function normalizeOptions(
|
export function normalizeOptions(
|
||||||
@ -41,6 +42,8 @@ export function normalizeOptions(
|
|||||||
options.js ? '/src/main.js' : '/src/main.tsx'
|
options.js ? '/src/main.js' : '/src/main.tsx'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const entryFileAbsolutePath = join(host.root, entryFile);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* if options.name is "my-app"
|
* if options.name is "my-app"
|
||||||
* name: "my-app", className: 'MyApp', lowerCaseName: 'myapp', displayName: 'MyApp', projectName: 'my-app', appProjectRoot: 'apps/my-app', androidProjectRoot: 'apps/my-app/android', iosProjectRoot: 'apps/my-app/ios'
|
* name: "my-app", className: 'MyApp', lowerCaseName: 'myapp', displayName: 'MyApp', projectName: 'my-app', appProjectRoot: 'apps/my-app', androidProjectRoot: 'apps/my-app/android', iosProjectRoot: 'apps/my-app/ios'
|
||||||
@ -61,5 +64,6 @@ export function normalizeOptions(
|
|||||||
androidProjectRoot,
|
androidProjectRoot,
|
||||||
parsedTags,
|
parsedTags,
|
||||||
entryFile,
|
entryFile,
|
||||||
|
entryFileAbsolutePath,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user