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

Consolidate built files into Libraries folder #2727

Merged
merged 3 commits into from
Jul 3, 2019

Conversation

acoates-ms
Copy link
Contributor

@acoates-ms acoates-ms commented Jul 3, 2019

In order to work with the existing hasteImpl and plugin system of react-native, the built npm package should have all the haste modules in the Libraries folder. Currently they are split across the Libraries folder and lib/Libraries, which causes us to require a custom haste impl, which the default RN getPlugins infrastructure doesn't pick up.

This will also be a requirement in 0.60 when react-native drops haste entirely.

In order to do this

  • I moved the existing JS flow files in Libraries into src/Libraries.
  • added a build step that copies the js files from src/Libraries into Libraries.
  • Modified the TS build to output the transformed JS files in the Libraries folder instead of the lib/Libraries folder
Microsoft Reviewers: Open in CodeFlow

@acoates-ms acoates-ms requested a review from kmelmon July 3, 2019 04:56
@acoates-ms acoates-ms requested a review from a team as a code owner July 3, 2019 04:56
module: 'commonjs',
});
});
task('clean', () => {
return cleanTask(
['lib', 'temp', 'dist', 'coverage'].map(p => path.join(process.cwd(), p)),
['Libraries', 'RNTester', 'lib'].map(p => path.join(process.cwd(), p)),
Copy link
Contributor

Choose a reason for hiding this comment

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

RNTester [](start = 19, length = 8)

The getting started guide (https://github.com/microsoft/react-native-windows/blob/master/vnext/docs/GettingStarted.md) will need updating to point folks at the new location for RNTester.

Copy link
Contributor

@kmelmon kmelmon left a comment

Choose a reason for hiding this comment

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

:shipit:

@acoates-ms
Copy link
Contributor Author

Pushing before updating other things, since other people changing files while I'm trying to move them risks accidentally losing changes during merges.

@acoates-ms acoates-ms merged commit 40a9402 into microsoft:master Jul 3, 2019
@acoates-ms acoates-ms deleted the nolib branch July 3, 2019 14:06
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