Skip to content

Commit

Permalink
chore: first init via rn-template-app
Browse files Browse the repository at this point in the history
  • Loading branch information
burhanyilmaz committed Dec 16, 2022
0 parents commit 149ceb5
Show file tree
Hide file tree
Showing 94 changed files with 12,036 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .buckconfig
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
2 changes: 2 additions & 0 deletions .bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BUNDLE_PATH: "vendor/bundle"
BUNDLE_FORCE_RUBY_PLATFORM: 1
1 change: 1 addition & 0 deletions .eslintcache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"/Users/burhanyilmaz/burhandev/rntemp/template/src/App.tsx":"1","/Users/burhanyilmaz/burhandev/rntemp/template/src/components/CustomButton.tsx":"2"},{"size":917,"mtime":1666683098924,"results":"3","hashOfConfig":"4"},{"size":542,"mtime":1666683110923,"results":"5","hashOfConfig":"4"},{"filePath":"6","messages":"7","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1y9pcvs",{"filePath":"8","messages":"9","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/burhanyilmaz/burhandev/rntemp/template/src/App.tsx",[],"/Users/burhanyilmaz/burhandev/rntemp/template/src/components/CustomButton.tsx",[]]
42 changes: 42 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
module.exports = {
'env': {
'browser': true,
'es2021': true
},
'extends': [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended'
],
'parser': '@typescript-eslint/parser',
'parserOptions': {
'ecmaFeatures': {
'jsx': true
},
'ecmaVersion': 12,
'sourceType': 'module'
},
'plugins': [
'react',
'@typescript-eslint',
'prettier'
],
'rules': {
'@typescript-eslint/no-shadow': ['error'],
'no-shadow': 'off',
'no-undef': 'off',

'indent': [ 'error', 2],
'linebreak-style': ['error', 'unix'],
'quotes': ['error', 'single'],
'semi': ['error','always'],
'no-console': ['error'],
'@typescript-eslint/no-unused-vars': ['error'],
'no-use-before-define': 'off',
'newline-before-return': 1,
'react-hooks/exhaustive-deps': 0,
'react/function-component-definition': 0,
'arrow-body-style': [1, 'as-needed'],
'object-curly-spacing': ['error', 'always']
},
};
64 changes: 64 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# 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
.cxx/

# node.js
#
node_modules/
npm-debug.log
yarn-error.log
!.husky/_/.gitignore
# 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/
24 changes: 24 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

if yarn run format; then
echo "✅ Code is formatted."
else
echo "❌ Code is not formatted. And maybe you need this command ⚠️ ⚠️ ⚠️ git add . ⚠️ ⚠️ ⚠️"
exit 1
fi


if yarn validate --fix; then
echo "✅ Code is valid."
else
echo "❌ Code is invalid. And maybe you need this command ⚠️ ⚠️ ⚠️ git add . ⚠️ ⚠️ ⚠️"
exit 1
fi

if yarn test; then
echo "✅ Code is tested successfully."
else
echo "❌ Code didn't tested successfully."
exit 1
fi
10 changes: 10 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
"arrowParens": "avoid",
"bracketSameLine": true,
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"bracketSpacing": true,
"trailingComma" : "all",
"printWidth": 100
};
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.7.5
1 change: 1 addition & 0 deletions .watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
6 changes: 6 additions & 0 deletions Gemfile
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'
12 changes: 12 additions & 0 deletions __tests__/App-test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* @format
*/

import 'react-native';
import React from 'react';
import App from '../src/navigators/MainNavigator';
import { render } from '@testing-library/react-native';

it('renders correctly', () => {
render(<App />);
});
16 changes: 16 additions & 0 deletions __tests__/mock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import 'react-native-gesture-handler/jestSetup';

jest.mock('react-native-reanimated', () => {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const Reanimated = require('react-native-reanimated/mock');

// The mock for `call` immediately calls the callback which is incorrect
// So we override it with a no-op
// eslint-disable-next-line @typescript-eslint/no-empty-function
Reanimated.default.call = () => {};

return Reanimated;
});

// Silence the warning: Animated: `useNativeDriver` is not supported because the native animated module is missing
jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');
1 change: 1 addition & 0 deletions _node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16
55 changes: 55 additions & 0 deletions android/app/_BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# To learn about Buck see [Docs](https://buckbuild.com/).
# To run your application with Buck:
# - install Buck
# - `npm start` - to start the packager
# - `cd android`
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
# - `buck install -r android/app` - compile, install and run application
#

load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")

lib_deps = []

create_aar_targets(glob(["libs/*.aar"]))

create_jar_targets(glob(["libs/*.jar"]))

android_library(
name = "all-libs",
exported_deps = lib_deps,
)

android_library(
name = "app-code",
srcs = glob([
"src/main/java/**/*.java",
]),
deps = [
":all-libs",
":build_config",
":res",
],
)

android_build_config(
name = "build_config",
package = "com.scrollprogress",
)

android_resource(
name = "res",
package = "com.scrollprogress",
res = "src/main/res",
)

android_binary(
name = "app",
keystore = "//android/keystores:debug",
manifest = "src/main/AndroidManifest.xml",
package_type = "debug",
deps = [
":app-code",
],
)
Loading

0 comments on commit 149ceb5

Please sign in to comment.