forked from callstack/react-native-slider
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Leave Yarn workspaces and reorganize repo structure (callstack#397)
* remove yarn lockfile * correct the link in the podspec file * remove npm ignore config * remove git attributes config file * Make src the package directory * Use local node modules for example project * Remove workspaces entry from main package JSON * Use npm instead of yarn separately for each package * Recreate the example project with react-native from scratch * Install React Native Windows in example app * Use npm for example app * Install local Slider package in example app * Fix dependencies conflict by removing peer dependencies * Use copyfiles to replace symlink with existing files * Install and link Slider in iOS example * Bring back original Example app JS implementation * Install missing babel-preset-expo * Remove unused configuration files * Fix linting errors according to new linter version * Bring back React & React Native to dev deps * Configure flow and ESLint for tests and linting * Use rimraf for cross-platform package scripts * Adjust CI config to new repo structure * Fix Jest and build paths in CI config * Use native build to check against example app compilation * Correct paths in native example builds * Do not exclude archs and keep the node_modules slider * Link Slider project into windows example app * Remove legacy CppWinRT project from Windows Slider * Add basic scripts for installing modules and running example * Update README and script according to new repo structure
- Loading branch information
1 parent
2fb1b15
commit 559edef
Showing
152 changed files
with
24,320 additions
and
10,342 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
rn: react-native-community/react-native@6.1.0 | ||
rn: react-native-community/react-native@7.1.0 | ||
windows: circleci/[email protected] | ||
android: circleci/[email protected] | ||
macos: circleci/[email protected] | ||
|
||
jobs: | ||
checkout_code: | ||
|
@@ -18,23 +20,30 @@ jobs: | |
steps: | ||
- attach_workspace: | ||
at: . | ||
- rn/yarn_install | ||
- run: | ||
name: Install node modules for package | ||
command: cd package && npm install | ||
- run: | ||
name: Install node modules for example app | ||
command: cd example && npm install | ||
- run: | ||
name: Lint JS Code (ESLint) | ||
command: yarn run validate:eslint | ||
command: cd package && npx eslint src | ||
- run: | ||
name: Flow | ||
command: yarn run validate:flow | ||
name: Lint Example app JS code (ESLint) | ||
command: cd example && npx eslint . | ||
|
||
test: | ||
executor: rn/linux_js | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
- rn/yarn_install | ||
- run: | ||
name: Install node modules for package | ||
command: cd package && npm install | ||
- run: | ||
name: Run unit tests with Jest | ||
command: yarn run test:jest | ||
command: cd package && npx jest src | ||
|
||
build_example_windows: | ||
executor: | ||
|
@@ -44,13 +53,13 @@ jobs: | |
- checkout | ||
- run: | ||
name: Install examples | ||
command: cd src; yarn install; cd ../example; yarn install --force --frozen-lockfile | ||
command: cd package; npm install; cd ../example; npm install | ||
- run: | ||
name: "Restore NuGet packages for Components" | ||
command: nuget restore .\example\windows\SliderTestWindows.sln | ||
command: nuget restore .\example\windows\example.sln | ||
- run: | ||
name: "Restore .NET dependencies" | ||
command: msbuild -t:restore .\example\windows\SliderTestWindows.sln | ||
command: msbuild -t:restore .\example\windows\example.sln | ||
- run: | ||
name: Build example Windows | ||
command: cd example; npx react-native run-windows --no-packager --no-launch --arch x64 --logging --no-deploy | ||
|
@@ -61,24 +70,48 @@ jobs: | |
- checkout | ||
- run: | ||
name: Install deps | ||
command: cd src && yarn install && cd ../example && yarn install --force --frozen-lockfile | ||
command: cd package && npm install && cd ../example && npm install | ||
- run: | ||
name: Install Pods | ||
command: cd example && npx pod-install | ||
- run: | ||
name: Build the iOS example project | ||
command: cd example/ios && export RCT_NO_LAUNCH_PACKAGER=true && xcodebuild -workspace example.xcworkspace -destination 'platform=iOS Simulator,name=iPhone 11' -scheme example -parallelizeTargets -configuration Debug -derivedDataPath build -UseModernBuildSystem=YES | ||
|
||
# To be uncommented as a part of https://github.com/react-native-community/react-native-slider/issues/34 | ||
# publish: | ||
# executor: rn/linux_js | ||
# steps: | ||
# - attach_workspace: | ||
# at: . | ||
# - rn/yarn_install | ||
# - run: | ||
# name: Publish to NPM | ||
# command: yarn ci:publish | ||
android-debug: | ||
executor: | ||
name: android/android-machine | ||
resource-class: large | ||
tag: 2021.10.1 | ||
working_directory: ~/project | ||
steps: | ||
- checkout: | ||
path: ~/project | ||
- run: | ||
command: cd package && npm install | ||
- run: | ||
command: cd example && npm install | ||
- run: | ||
name: Assemble debug build | ||
command: cd example/android && ./gradlew clean build | ||
|
||
ios-debug: | ||
macos: | ||
xcode: 13.3.1 | ||
working_directory: /Users/distiller/project | ||
steps: | ||
- checkout: | ||
path: ~/project | ||
- run: | ||
command: cd package && npm install | ||
- run: | ||
command: cd example && npm install | ||
- run: | ||
command: cd example/ios && pod install | ||
- run: | ||
name: Compile iOS app | ||
command: | | ||
cd example/ios && xcodebuild -workspace example.xcworkspace -configuration Debug -scheme example CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ENABLE_BITCODE=NO | ||
workflows: | ||
slider-full-ci: | ||
|
@@ -93,20 +126,9 @@ workflows: | |
- build_example_windows: | ||
requires: | ||
- verify | ||
- rn/android_build: | ||
name: build_android_debug | ||
project_path: "example/android" | ||
build_type: debug | ||
- android-debug: | ||
requires: | ||
- verify | ||
- build_example_ios: | ||
- ios-debug: | ||
requires: | ||
- verify | ||
# - publish: | ||
# requires: | ||
# - analyse | ||
# - rn/android_test | ||
# - rn/ios_build_and_test | ||
# filters: | ||
# branches: | ||
# only: master |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
[android] | ||
target = Google Inc.:Google APIs:23 | ||
|
||
[maven_repositories] | ||
central = https://repo1.maven.org/maven2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
BUNDLE_PATH: "vendor/bundle" | ||
BUNDLE_FORCE_RUBY_PLATFORM: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
root: true, | ||
extends: '@react-native-community', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
[ignore] | ||
; We fork some components by platform | ||
.*/*[.]android.js | ||
|
||
; Ignore "BUCK" generated dirs | ||
<PROJECT_ROOT>/\.buckd/ | ||
|
||
; Ignore polyfills | ||
node_modules/react-native/Libraries/polyfills/.* | ||
|
||
; Flow doesn't support platforms | ||
.*/Libraries/Utilities/LoadingView.js | ||
|
||
.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$ | ||
|
||
[untyped] | ||
.*/node_modules/@react-native-community/cli/.*/.* | ||
|
||
[include] | ||
|
||
[libs] | ||
node_modules/react-native/interface.js | ||
node_modules/react-native/flow/ | ||
|
||
[options] | ||
emoji=true | ||
|
||
exact_by_default=true | ||
|
||
format.bracket_spacing=false | ||
|
||
module.file_ext=.js | ||
module.file_ext=.json | ||
module.file_ext=.ios.js | ||
|
||
munge_underscores=true | ||
|
||
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1' | ||
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub' | ||
|
||
suppress_type=$FlowIssue | ||
suppress_type=$FlowFixMe | ||
suppress_type=$FlowFixMeProps | ||
suppress_type=$FlowFixMeState | ||
|
||
[lints] | ||
sketchy-null-number=warn | ||
sketchy-null-mixed=warn | ||
sketchy-number=warn | ||
untyped-type-import=warn | ||
nonstrict-import=warn | ||
deprecated-type=warn | ||
unsafe-getters-setters=warn | ||
unnecessary-invariant=warn | ||
|
||
[strict] | ||
deprecated-type | ||
nonstrict-import | ||
sketchy-null | ||
unclear-type | ||
unsafe-getters-setters | ||
untyped-import | ||
untyped-type-import | ||
|
||
[version] | ||
^0.176.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# OSX | ||
# | ||
.DS_Store | ||
|
||
# Xcode | ||
# | ||
build/ | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
xcuserdata | ||
*.xccheckout | ||
*.moved-aside | ||
DerivedData | ||
*.hmap | ||
*.ipa | ||
*.xcuserstate | ||
ios/.xcode.env.local | ||
|
||
# Android/IntelliJ | ||
# | ||
build/ | ||
.idea | ||
.gradle | ||
local.properties | ||
*.iml | ||
*.hprof | ||
|
||
# node.js | ||
# | ||
node_modules/ | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
# BUCK | ||
buck-out/ | ||
\.buckd/ | ||
*.keystore | ||
!debug.keystore | ||
|
||
# fastlane | ||
# | ||
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the | ||
# screenshots whenever they are needed. | ||
# For more information about the recommended setup visit: | ||
# https://docs.fastlane.tools/best-practices/source-control/ | ||
|
||
**/fastlane/report.xml | ||
**/fastlane/Preview.html | ||
**/fastlane/screenshots | ||
**/fastlane/test_output | ||
|
||
# Bundle artifact | ||
*.jsbundle | ||
|
||
# Ruby / CocoaPods | ||
/ios/Pods/ | ||
/vendor/bundle/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
arrowParens: 'avoid', | ||
bracketSameLine: true, | ||
bracketSpacing: false, | ||
singleQuote: true, | ||
trailingComma: 'all', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2.7.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
source 'https://rubygems.org' | ||
|
||
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version | ||
ruby '2.7.5' | ||
|
||
gem 'cocoapods', '~> 1.11', '>= 1.11.2' |
Oops, something went wrong.