chore: Move everything into package/
(#1745)
* Move everything into package * Remove .DS_Store * Move scripts and eslintrc to package * Create CODE_OF_CONDUCT.md * fix some links * Update all links (I think) * Update generated docs * Update notice-yarn-changes.yml * Update validate-android.yml * Update validate-cpp.yml * Delete notice-yarn-changes.yml * Update validate-cpp.yml * Update validate-cpp.yml * Update validate-js.yml * Update validate-cpp.yml * Update validate-cpp.yml * wrong c++ style * Revert "wrong c++ style" This reverts commit 55a3575589c6f13f8b05134d83384f55e0601ab2.
This commit is contained in:
24
package/scripts/bootstrap.js
vendored
Normal file
24
package/scripts/bootstrap.js
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
const path = require('path');
|
||||
const child_process = require('child_process');
|
||||
|
||||
const root = path.resolve(__dirname, '..');
|
||||
const args = process.argv.slice(2);
|
||||
const options = {
|
||||
cwd: process.cwd(),
|
||||
env: process.env,
|
||||
stdio: 'inherit',
|
||||
encoding: 'utf-8',
|
||||
};
|
||||
|
||||
let result;
|
||||
|
||||
if (process.cwd() !== root || args.length) {
|
||||
// We're not in the root of the project, or additional arguments were passed
|
||||
// In this case, forward the command to `yarn`
|
||||
result = child_process.spawnSync('yarn', args, options);
|
||||
} else {
|
||||
// If `yarn` is run without arguments, perform bootstrap
|
||||
result = child_process.spawnSync('yarn', ['bootstrap'], options);
|
||||
}
|
||||
|
||||
process.exitCode = result.status;
|
19
package/scripts/check-all.sh
Executable file
19
package/scripts/check-all.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Formatting Swift code.."
|
||||
./scripts/swiftformat.sh
|
||||
|
||||
echo "Linting Swift code.."
|
||||
./scripts/swiftlint.sh
|
||||
|
||||
echo "Linting Kotlin code.."
|
||||
./scripts/ktlint.sh
|
||||
|
||||
echo "Formatting C++ code.."
|
||||
./scripts/clang-format.sh
|
||||
|
||||
echo "Linting JS/TS code.."
|
||||
yarn lint --fix
|
||||
yarn typescript
|
||||
|
||||
echo "All done!"
|
9
package/scripts/clang-format.sh
Executable file
9
package/scripts/clang-format.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if which clang-format >/dev/null; then
|
||||
find cpp ios android/src/main/cpp -type f \( -name "*.h" -o -name "*.cpp" -o -name "*.m" -o -name "*.mm" \) -print0 | while read -d $'\0' file; do
|
||||
clang-format -style=file:./cpp/.clang-format -i "$file"
|
||||
done
|
||||
else
|
||||
echo "warning: clang-format not installed, download from https://clang.llvm.org/docs/ClangFormat.html (or run brew install clang-format)"
|
||||
fi
|
40
package/scripts/clean-android.sh
Executable file
40
package/scripts/clean-android.sh
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
cd ..
|
||||
echo "Running clean script in $PWD"
|
||||
|
||||
cd android
|
||||
echo "./gradlew clean"
|
||||
./gradlew clean
|
||||
|
||||
echo "rm -rf node_modules"
|
||||
rm -rf node_modules
|
||||
echo "rm -rf yarn.lock"
|
||||
rm -rf yarn.lock
|
||||
rm -rf package-lock.json
|
||||
|
||||
echo "cd example"
|
||||
cd example
|
||||
|
||||
echo "rm -rf node_modules"
|
||||
rm -rf node_modules
|
||||
echo "rm -rf yarn.lock"
|
||||
rm -rf yarn.lock
|
||||
rm -rf package-lock.json
|
||||
|
||||
cd ..
|
||||
|
||||
echo "rm -rf android/.cxx"
|
||||
rm -rf android/.cxx
|
||||
echo "rm -rf android/.gradle"
|
||||
rm -rf android/.gradle
|
||||
echo "rm -rf android/build"
|
||||
rm -rf android/build
|
||||
|
||||
echo "yarn in $PWD"
|
||||
yarn
|
||||
|
||||
cd example
|
||||
echo "yarn in $PWD"
|
||||
yarn
|
28
package/scripts/clean-ios.sh
Executable file
28
package/scripts/clean-ios.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
cd ..
|
||||
echo "Running clean script in $PWD"
|
||||
|
||||
echo "rm -rf ~/Library/Caches/CocoaPods"
|
||||
rm -rf ~/Library/Caches/CocoaPods
|
||||
echo "rm -rf ~/Library/Developer/Xcode/DerivedData/*"
|
||||
rm -rf ~/Library/Developer/Xcode/DerivedData/*
|
||||
|
||||
echo "cd example/ios"
|
||||
cd example/ios
|
||||
echo "rm -rf ios/Pods"
|
||||
rm -rf Pods
|
||||
echo "rm -rf ios/Podfile.lock"
|
||||
rm -rf Podfile.lock
|
||||
echo "pod deintegrate"
|
||||
pod deintegrate
|
||||
echo "bundle clean"
|
||||
bundle clean --force
|
||||
|
||||
echo "bundle install"
|
||||
bundle install
|
||||
echo "pod setup"
|
||||
bundle exec pod setup
|
||||
echo "pod install"
|
||||
bundle exec pod install
|
28
package/scripts/clean-js.sh
Executable file
28
package/scripts/clean-js.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
cd ..
|
||||
echo "Running clean script in $PWD"
|
||||
|
||||
echo "rm -rf node_modules"
|
||||
rm -rf node_modules
|
||||
echo "rm -rf yarn.lock"
|
||||
rm -rf yarn.lock
|
||||
rm -rf package-lock.json
|
||||
|
||||
echo "cd example"
|
||||
cd example
|
||||
|
||||
echo "rm -rf node_modules"
|
||||
rm -rf node_modules
|
||||
echo "rm -rf yarn.lock"
|
||||
rm -rf yarn.lock
|
||||
rm -rf package-lock.json
|
||||
|
||||
cd ..
|
||||
echo "yarn in $PWD"
|
||||
yarn
|
||||
|
||||
cd example
|
||||
echo "yarn in $PWD"
|
||||
yarn
|
7
package/scripts/ktlint.sh
Executable file
7
package/scripts/ktlint.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if which ktlint >/dev/null; then
|
||||
cd android && ktlint -F ./**/*.kt*
|
||||
else
|
||||
echo "warning: KTLint not installed, download from https://github.com/pinterest/ktlint"
|
||||
fi
|
7
package/scripts/swiftformat.sh
Executable file
7
package/scripts/swiftformat.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if which swiftformat >/dev/null; then
|
||||
cd ios && swiftformat --quiet .
|
||||
else
|
||||
echo "warning: SwiftFormat not installed, download from https://github.com/nicklockwood/SwiftFormat"
|
||||
fi
|
7
package/scripts/swiftlint.sh
Executable file
7
package/scripts/swiftlint.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if which swiftlint >/dev/null; then
|
||||
cd ios && swiftlint --quiet --fix && swiftlint --quiet
|
||||
else
|
||||
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
|
||||
fi
|
Reference in New Issue
Block a user