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

build: use template from react-native #84

Merged
merged 5 commits into from
Jan 17, 2019
Merged

Conversation

Esemesek
Copy link
Member

@Esemesek Esemesek commented Jan 11, 2019

Remove templates from react-native-cli and use template from react-native repo.

Tests:
Used https://github.com/verdaccio/verdaccio to create local distributions of react-native and react-native-local-cli and initialized project using those packages

@Esemesek Esemesek requested a review from grabbou January 11, 2019 19:50
@grabbou
Copy link
Member

grabbou commented Jan 14, 2019

@grabbou
Copy link
Member

grabbou commented Jan 14, 2019

I was unable to get it up & running locally, so let's go through it once again, when the above is resolved too.

destPath,
newProjectName
const templatePath = path.resolve(
process.cwd(),
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this needs to be destPath (the project directory, passed from init()) instead of the current working directory (which could be any dir where the command to create a project was run).

Copy link
Member

Choose a reason for hiding this comment

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

actually we could just use require.resolve('react-native/template') instead, since we are in context of node_modules, right?

Note that destPath is still passed on line 32. The diff might be confusing, but we are only changing the "path.resolve(__dirname, '../templates/HelloWorld')," part.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, require.resolve should work I think.

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.

3 participants