Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make plugins pods paths relative #84

Merged
merged 1 commit into from
Jan 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cli/src/ios/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ export async function resolvePlugin(plugin: Plugin): Promise<Plugin|null> {
if (!plugin.manifest.ios.src) {
throw 'capacitor.ios.src is missing';
}
iosPath = join(plugin.rootPath, plugin.manifest.ios.src);
iosPath = plugin.manifest.ios.src;
} else if (plugin.xml) {
iosPath = join(plugin.rootPath, "src/ios");
iosPath = "src/ios";
} else {
return null;
}
Expand All @@ -58,7 +58,7 @@ export async function resolvePlugin(plugin: Plugin): Promise<Plugin|null> {
type: PluginType.Code,
path: iosPath
};
const files = await readdirAsync(iosPath);
const files = await readdirAsync(join(plugin.rootPath, iosPath));
const podSpec = files.find(file => file.endsWith('.podspec'));
if (podSpec) {
plugin.ios.type = PluginType.Cocoapods;
Expand Down
4 changes: 2 additions & 2 deletions cli/src/ios/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export async function autoGeneratePods(plugins: Plugin[]): Promise<void[]> {
const name = p.ios!.name = p.name;
p.ios!.type = PluginType.Cocoapods;
const content = generatePodspec(name);
const path = join(p.ios!.path, name + '.podspec');
const path = join(p.rootPath, p.ios!.path, name + '.podspec');
return writeFileAsync(path, content);
}));
}
Expand Down Expand Up @@ -118,7 +118,7 @@ export async function updatePodfile(config: Config, plugins: Plugin[], needsUpda

export function generatePodFile(config: Config, plugins: Plugin[]) {
const pods = plugins
.map((p) => `pod '${p.ios!.name}', :path => '${p.ios!.path}'`);
.map((p) => `pod '${p.ios!.name}', :path => '../../node_modules/${p.id}/${p.ios!.path}'`);

return `
# DO NOT MODIFY.
Expand Down