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

Allow passing a path for the android and iOS project locations #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

daentech
Copy link

The project I'm working on (just an Android app) has an existing android app structure we don't want to modify. Thus our android project is not in the android folder of the project root. To be able to link the assets I needed a custom path.

These paths default to the current android and ios locations unless overriden

},
};

const config = getConfig({ rootPath });
const config = getConfig({ rootPath, androidProjectPath: platforms.android.projectPath, iosProjectPath: platforms.ios.projectPath, });
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaking change for the node api (not cli) since now must provide paths for the projects

module.exports = ({ rootPath }) => {
const iosPath = path.resolve(rootPath, 'ios');
const androidPath = path.resolve(rootPath, 'android');
module.exports = ({ rootPath, androidProjectPath, iosProjectPath }) => {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default values could have been here like so

{ rootPath, androidProjectPath = 'android', iosProjectPath = 'ios' }

lib/cli.js Outdated
iosProjectPath: {
cliParams: ['-ios-p', '--ios-project-path'],
type: 'value',
default: 'ios',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be removed from here if the default value is given in the node api

In the case of not having a standard project structure, we should still
be able to link the assets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants