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
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: 5 additions & 1 deletion vnext/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/lib
/Libraries
/local-cli/generator-windows/templates/App.windows.js
/node_modules
/packages
/packages
/RNTester
/index.*
/RNTester.*
4 changes: 4 additions & 0 deletions vnext/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ node_modules
/bots/node_modules/

/lib
/Libraries
/RNTester
/RNTester.*
/index.*

# Visual Studio
.vs/
Expand Down
28 changes: 14 additions & 14 deletions vnext/.npmignore
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
.vs
.vscode
**/*.inc
**/*.windesktop.*
build
CMakeLists.txt
Desktop
Desktop.Dll
Desktop.IntegrationTests
Desktop.UnitTests
FollyWin32
IntegrationTests
IntegrationTestScripts
NuGet.Config
package-deps.json
packages
react-native-windows.build.log
ReactUwp.nuspec
ReactWin32.nuspec
ReactWin32SandboxSample
ReactWindows-CopyToStaging.bat
ReactWindows-TestNuspec.bat
ReactWindows-UWP.sln
ReactWindows.sln
RNTester.*
RNTester/
src/
target
Universal.IntegrationTests
Universal.SampleApp
Universal.UnitTests
win32
WindowsSampleCSharpApp
NuGet.Config
package-deps.json
react-native-windows.build.log
ReactWin32.nuspec
ReactWindows-CopyToStaging.bat
ReactWindows-TestNuspec.bat
ReactUwp.nuspec
ReactWindows.sln
ReactWindows-UWP.sln
**/*.inc
CMakeLists.txt
**/sources
**/dirs
**/*.windesktop.js
20 changes: 17 additions & 3 deletions vnext/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 17 additions & 3 deletions vnext/index.uwp.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 14 additions & 3 deletions vnext/just-task.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
const path = require('path');
const {
task,
copyTask,
series,
condition,
option,
Expand All @@ -25,6 +26,9 @@ option('clean');
task('eslint', () => {
return eslintTask();
});
task('copyFlowFiles', () => {
return copyTask(['src/**/*.js'], '.');
});
task('ts', () => {
return tscTask({
pretty: true,
Expand All @@ -33,14 +37,21 @@ task('ts', () => {
sourceRoot: path.relative(libPath, srcPath),
}),
target: 'es5',
outDir: 'lib',
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.

);
});

task('build', series(condition('clean', () => argv().clean), 'eslint', 'ts'));
task(
'build',
series(
condition('clean', () => argv().clean),
'eslint',
'copyFlowFiles',
'ts',
),
);
4 changes: 2 additions & 2 deletions vnext/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"directory": "vnext"
},
"description": "ReactNative Windows implementation using react-native's c++ ReactCommon bridge",
"types": "lib/index.d.ts",
"types": "index.d.ts",
"scripts": {
"preinstall": "node Scripts/preInstall.js",
"postinstall": "node Scripts/postInstall.js",
Expand Down Expand Up @@ -77,4 +77,4 @@
"react": "16.8.3",
"react-native": "^0.59.0 || 0.59.0-microsoft.11 || https://github.com/microsoft/react-native/archive/v0.59.0-microsoft.11.tar.gz"
}
}
}
2 changes: 1 addition & 1 deletion vnext/rn-cli.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ if (
!fs.existsSync(
path.resolve(
__dirname,
'lib/Libraries/Components/AccessibilityInfo/AccessibilityInfo.uwp.js',
'Libraries/Components/AccessibilityInfo/AccessibilityInfo.uwp.js',
),
)
) {
Expand Down
4 changes: 2 additions & 2 deletions vnext/src/RNTester/RNTesterApp.uwp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const RNTesterActions = require('react-native/RNTester/js/RNTesterActions');
const RNTesterExampleContainer = require('react-native/RNTester/js/RNTesterExampleContainer');
const RNTesterExampleList = require('react-native/RNTester/js/RNTesterExampleList');
import RNTesterList from './RNTesterList.uwp';
import RNTesterNavigationReducer from './RNTesterNavigationReducer';
import {RNTesterAction} from './RNTesterActions';
import RNTesterNavigationReducer from './RNTesterNavigationReducer.uwp';
import {RNTesterAction} from './RNTesterActions.uwp';

const styles = StyleSheet.create({
headerContainer: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'use strict';

import RNTesterList from './RNTesterList.uwp';
import {RNTesterAction} from './RNTesterActions';
import {RNTesterAction} from './RNTesterActions.uwp';

interface IRNTesterNavigationState {
openExample?: string;
Expand Down
8 changes: 5 additions & 3 deletions vnext/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
"target": "es6",
"module": "commonjs",
"jsx": "react",
"outDir": "lib",
"outDir": ".",
"declaration": true,
"sourceMap": true,
"experimentalDecorators": true,
"noEmitOnError": true,
"skipLibCheck": true,
"moduleResolution": "node",
"noUnusedLocals": true,
"strict": true
"strict": true,
"rootDir": "src"
},
"include": ["src"],
"exclude": ["node_modules", "dist", "lib"]
}
}