├── .gitignore
├── .npmignore
├── LICENSE
├── README.md
├── examples
├── angular
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── angular.json
│ ├── e2e
│ │ ├── protractor.conf.js
│ │ ├── src
│ │ │ ├── app.e2e-spec.ts
│ │ │ └── app.po.ts
│ │ └── tsconfig.e2e.json
│ ├── package-lock.json
│ ├── package.json
│ ├── src
│ │ ├── app
│ │ │ ├── app.component.css
│ │ │ ├── app.component.html
│ │ │ ├── app.component.spec.ts
│ │ │ ├── app.component.ts
│ │ │ ├── app.module.ts
│ │ │ ├── i18nh.map.ts
│ │ │ ├── i18nh.pipe.spec.ts
│ │ │ └── i18nh.pipe.ts
│ │ ├── assets
│ │ │ └── .gitkeep
│ │ ├── browserslist
│ │ ├── environments
│ │ │ ├── environment.prod.ts
│ │ │ └── environment.ts
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── karma.conf.js
│ │ ├── main.ts
│ │ ├── polyfills.ts
│ │ ├── styles.css
│ │ ├── test.ts
│ │ ├── tsconfig.app.json
│ │ ├── tsconfig.spec.json
│ │ └── tslint.json
│ ├── tsconfig.json
│ └── tslint.json
├── nextjs
│ ├── package.json
│ └── pages
│ │ ├── _app.js
│ │ └── index.js
├── node
│ └── index.js
├── react-amazon-translate
│ ├── .gitignore
│ ├── .vscode
│ │ └── launch.json
│ ├── README.md
│ ├── package-lock.json
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ └── manifest.json
│ └── src
│ │ ├── App.css
│ │ ├── App.js
│ │ ├── App.test.js
│ │ ├── index.css
│ │ ├── index.js
│ │ ├── logo.svg
│ │ └── serviceWorker.js
├── react-native-example
│ └── .expo
│ │ ├── packager-info.json
│ │ └── settings.json
├── react
│ ├── .gitignore
│ ├── README.md
│ ├── package-lock.json
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ └── manifest.json
│ └── src
│ │ ├── App.css
│ │ ├── App.js
│ │ ├── App.test.js
│ │ ├── index.css
│ │ ├── index.js
│ │ ├── logo.svg
│ │ └── serviceWorker.js
├── reactnative
│ ├── .babelrc
│ ├── .buckconfig
│ ├── .flowconfig
│ ├── .gitattributes
│ ├── .gitignore
│ ├── .watchmanconfig
│ ├── App.js
│ ├── README.md
│ ├── android
│ │ ├── app
│ │ │ ├── BUCK
│ │ │ ├── build.gradle
│ │ │ ├── proguard-rules.pro
│ │ │ └── src
│ │ │ │ └── main
│ │ │ │ ├── AndroidManifest.xml
│ │ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── rectnative
│ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ └── MainApplication.java
│ │ │ │ └── res
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ └── values
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ ├── gradle
│ │ │ └── wrapper
│ │ │ │ ├── gradle-wrapper.jar
│ │ │ │ └── gradle-wrapper.properties
│ │ ├── gradlew
│ │ ├── gradlew.bat
│ │ ├── keystores
│ │ │ ├── BUCK
│ │ │ └── debug.keystore.properties
│ │ └── settings.gradle
│ ├── app.json
│ ├── index.js
│ ├── ios
│ │ ├── rectnative-tvOS
│ │ │ └── Info.plist
│ │ ├── rectnative-tvOSTests
│ │ │ └── Info.plist
│ │ ├── rectnative.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ └── xcshareddata
│ │ │ │ └── xcschemes
│ │ │ │ ├── rectnative-tvOS.xcscheme
│ │ │ │ └── rectnative.xcscheme
│ │ ├── rectnative
│ │ │ ├── AppDelegate.h
│ │ │ ├── AppDelegate.m
│ │ │ ├── Base.lproj
│ │ │ │ └── LaunchScreen.xib
│ │ │ ├── Images.xcassets
│ │ │ │ ├── AppIcon.appiconset
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Contents.json
│ │ │ ├── Info.plist
│ │ │ └── main.m
│ │ └── rectnativeTests
│ │ │ ├── Info.plist
│ │ │ └── rectnativeTests.m
│ ├── package-lock.json
│ ├── package.json
│ └── yarn.lock
├── vanila
│ └── index.html
└── vue-example
│ ├── .gitignore
│ ├── README.md
│ ├── babel.config.js
│ ├── package-lock.json
│ ├── package.json
│ ├── public
│ ├── favicon.ico
│ └── index.html
│ └── src
│ ├── App.vue
│ ├── assets
│ └── logo.png
│ ├── components
│ └── HelloWorld.vue
│ ├── i18nh.map.js
│ └── main.js
├── index.js
└── package.json
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 |
8 | # Runtime data
9 | pids
10 | *.pid
11 | *.seed
12 | *.pid.lock
13 |
14 | # Directory for instrumented libs generated by jscoverage/JSCover
15 | lib-cov
16 |
17 | # Coverage directory used by tools like istanbul
18 | coverage
19 |
20 | # nyc test coverage
21 | .nyc_output
22 |
23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24 | .grunt
25 |
26 | # Bower dependency directory (https://bower.io/)
27 | bower_components
28 |
29 | # node-waf configuration
30 | .lock-wscript
31 |
32 | # Compiled binary addons (https://nodejs.org/api/addons.html)
33 | build/Release
34 |
35 | # Dependency directories
36 | node_modules/
37 | jspm_packages/
38 |
39 | # TypeScript v1 declaration files
40 | typings/
41 |
42 | # Optional npm cache directory
43 | .npm
44 |
45 | # Optional eslint cache
46 | .eslintcache
47 |
48 | # Optional REPL history
49 | .node_repl_history
50 |
51 | # Output of 'npm pack'
52 | *.tgz
53 |
54 | # Yarn Integrity file
55 | .yarn-integrity
56 |
57 | # dotenv environment variables file
58 | .env
59 |
60 | # next.js build output
61 | .next
62 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | README.md
2 | .gitignore
3 | examples/
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Rodrigo Oler ⚡️
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # DEPRECATED because the initial idea was to have an alternative to using i18n with hooks, but now i18next is indicated and recommended!
2 |
3 | https://react.i18next.com/
4 |
5 | ## Install
6 |
7 | ## Support
8 |
9 | - [x] NodeJS
10 | - [x] React
11 | - [x] NextJS
12 | - [x] Create React App 1.0
13 | - [x] Create React App 2.0
14 | - [x] React Native
15 | - [x] PhoneGap / Cordova
16 | - [x] Angular
17 | - [x] Vue
18 | - [x] NativeScript
19 |
20 | #### NPM
21 | ```bash
22 | npm install i18nh --save
23 | ```
24 |
25 | #### YARN
26 | ```bash
27 | yarn add i18nh
28 | ```
29 |
30 | ## Use
31 |
32 | To use it is simple just look at the steps below
33 |
34 | ```js
35 | import i18nh, { useT } from 'i18nh'
36 |
37 | // Create a language object containing the
38 | // translations as in the example below
39 | const languages = {
40 | en: {
41 | hello: 'Hello',
42 | about: 'About',
43 | goodMorning: 'Good Morning',
44 | },
45 | pt: {
46 | hello: 'Olá',
47 | about: 'Sobre',
48 | goodMorning: 'Bom Dia',
49 | },
50 | }
51 |
52 | // i18nh load the language object containing
53 | // the translations and also the default language argument
54 | i18nh({
55 | languages,
56 | defaultLanguage: 'en'
57 | });
58 |
59 | const [t] = useT();
60 |
61 | console.log(t('hello'))
62 | // Hello
63 | console.log(t('about'))
64 | // About
65 | console.log(t('goodMorning'))
66 | // Good Morning
67 |
68 | console.log(t('hello', 'pt'))
69 | // Olá
70 | console.log(t('about', 'pt'))
71 | // Sobre
72 | console.log(t('goodMorning', 'pt'))
73 | // Bom Dia
74 | ```
75 |
--------------------------------------------------------------------------------
/examples/angular/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/examples/angular/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | yarn-error.log
34 | testem.log
35 | /typings
36 |
37 | # System Files
38 | .DS_Store
39 | Thumbs.db
40 |
--------------------------------------------------------------------------------
/examples/angular/README.md:
--------------------------------------------------------------------------------
1 | # AngularExample
2 |
3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.2.4.
4 |
5 | ## Development server
6 |
7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
8 |
9 | ## Code scaffolding
10 |
11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12 |
13 | ## Build
14 |
15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
16 |
17 | ## Running unit tests
18 |
19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20 |
21 | ## Running end-to-end tests
22 |
23 | Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
24 |
25 | ## Further help
26 |
27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
28 |
--------------------------------------------------------------------------------
/examples/angular/angular.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3 | "version": 1,
4 | "newProjectRoot": "projects",
5 | "projects": {
6 | "angular-example": {
7 | "root": "",
8 | "sourceRoot": "src",
9 | "projectType": "application",
10 | "prefix": "app",
11 | "schematics": {},
12 | "architect": {
13 | "build": {
14 | "builder": "@angular-devkit/build-angular:browser",
15 | "options": {
16 | "outputPath": "dist/angular-example",
17 | "index": "src/index.html",
18 | "main": "src/main.ts",
19 | "polyfills": "src/polyfills.ts",
20 | "tsConfig": "src/tsconfig.app.json",
21 | "assets": [
22 | "src/favicon.ico",
23 | "src/assets"
24 | ],
25 | "styles": [
26 | "src/styles.css"
27 | ],
28 | "scripts": []
29 | },
30 | "configurations": {
31 | "production": {
32 | "fileReplacements": [
33 | {
34 | "replace": "src/environments/environment.ts",
35 | "with": "src/environments/environment.prod.ts"
36 | }
37 | ],
38 | "optimization": true,
39 | "outputHashing": "all",
40 | "sourceMap": false,
41 | "extractCss": true,
42 | "namedChunks": false,
43 | "aot": true,
44 | "extractLicenses": true,
45 | "vendorChunk": false,
46 | "buildOptimizer": true
47 | }
48 | }
49 | },
50 | "serve": {
51 | "builder": "@angular-devkit/build-angular:dev-server",
52 | "options": {
53 | "browserTarget": "angular-example:build"
54 | },
55 | "configurations": {
56 | "production": {
57 | "browserTarget": "angular-example:build:production"
58 | }
59 | }
60 | },
61 | "extract-i18n": {
62 | "builder": "@angular-devkit/build-angular:extract-i18n",
63 | "options": {
64 | "browserTarget": "angular-example:build"
65 | }
66 | },
67 | "test": {
68 | "builder": "@angular-devkit/build-angular:karma",
69 | "options": {
70 | "main": "src/test.ts",
71 | "polyfills": "src/polyfills.ts",
72 | "tsConfig": "src/tsconfig.spec.json",
73 | "karmaConfig": "src/karma.conf.js",
74 | "styles": [
75 | "src/styles.css"
76 | ],
77 | "scripts": [],
78 | "assets": [
79 | "src/favicon.ico",
80 | "src/assets"
81 | ]
82 | }
83 | },
84 | "lint": {
85 | "builder": "@angular-devkit/build-angular:tslint",
86 | "options": {
87 | "tsConfig": [
88 | "src/tsconfig.app.json",
89 | "src/tsconfig.spec.json"
90 | ],
91 | "exclude": [
92 | "**/node_modules/**"
93 | ]
94 | }
95 | }
96 | }
97 | },
98 | "angular-example-e2e": {
99 | "root": "e2e/",
100 | "projectType": "application",
101 | "architect": {
102 | "e2e": {
103 | "builder": "@angular-devkit/build-angular:protractor",
104 | "options": {
105 | "protractorConfig": "e2e/protractor.conf.js",
106 | "devServerTarget": "angular-example:serve"
107 | },
108 | "configurations": {
109 | "production": {
110 | "devServerTarget": "angular-example:serve:production"
111 | }
112 | }
113 | },
114 | "lint": {
115 | "builder": "@angular-devkit/build-angular:tslint",
116 | "options": {
117 | "tsConfig": "e2e/tsconfig.e2e.json",
118 | "exclude": [
119 | "**/node_modules/**"
120 | ]
121 | }
122 | }
123 | }
124 | }
125 | },
126 | "defaultProject": "angular-example"
127 | }
--------------------------------------------------------------------------------
/examples/angular/e2e/protractor.conf.js:
--------------------------------------------------------------------------------
1 | // Protractor configuration file, see link for more information
2 | // https://github.com/angular/protractor/blob/master/lib/config.ts
3 |
4 | const { SpecReporter } = require('jasmine-spec-reporter');
5 |
6 | exports.config = {
7 | allScriptsTimeout: 11000,
8 | specs: [
9 | './src/**/*.e2e-spec.ts'
10 | ],
11 | capabilities: {
12 | 'browserName': 'chrome'
13 | },
14 | directConnect: true,
15 | baseUrl: 'http://localhost:4200/',
16 | framework: 'jasmine',
17 | jasmineNodeOpts: {
18 | showColors: true,
19 | defaultTimeoutInterval: 30000,
20 | print: function() {}
21 | },
22 | onPrepare() {
23 | require('ts-node').register({
24 | project: require('path').join(__dirname, './tsconfig.e2e.json')
25 | });
26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
27 | }
28 | };
--------------------------------------------------------------------------------
/examples/angular/e2e/src/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { AppPage } from './app.po';
2 |
3 | describe('workspace-project App', () => {
4 | let page: AppPage;
5 |
6 | beforeEach(() => {
7 | page = new AppPage();
8 | });
9 |
10 | it('should display welcome message', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('Welcome to angular-example!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/examples/angular/e2e/src/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, by, element } from 'protractor';
2 |
3 | export class AppPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/examples/angular/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types": [
8 | "jasmine",
9 | "jasminewd2",
10 | "node"
11 | ]
12 | }
13 | }
--------------------------------------------------------------------------------
/examples/angular/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "angular-example",
3 | "version": "0.0.0",
4 | "scripts": {
5 | "ng": "ng",
6 | "start": "ng serve",
7 | "build": "ng build",
8 | "test": "ng test",
9 | "lint": "ng lint",
10 | "e2e": "ng e2e"
11 | },
12 | "private": true,
13 | "dependencies": {
14 | "@angular/animations": "^6.1.0",
15 | "@angular/common": "^6.1.0",
16 | "@angular/compiler": "^6.1.0",
17 | "@angular/core": "^6.1.0",
18 | "@angular/forms": "^6.1.0",
19 | "@angular/http": "^6.1.0",
20 | "@angular/platform-browser": "^6.1.0",
21 | "@angular/platform-browser-dynamic": "^6.1.0",
22 | "@angular/router": "^6.1.0",
23 | "core-js": "^2.5.4",
24 | "i18nh": "0.0.3",
25 | "rxjs": "~6.2.0",
26 | "zone.js": "~0.8.26"
27 | },
28 | "devDependencies": {
29 | "@angular-devkit/build-angular": "~0.8.0",
30 | "@angular/cli": "~6.2.4",
31 | "@angular/compiler-cli": "^6.1.0",
32 | "@angular/language-service": "^6.1.0",
33 | "@types/jasmine": "~2.8.8",
34 | "@types/jasminewd2": "~2.0.3",
35 | "@types/node": "~8.9.4",
36 | "codelyzer": "~4.3.0",
37 | "jasmine-core": "~2.99.1",
38 | "jasmine-spec-reporter": "~4.2.1",
39 | "karma": "~3.0.0",
40 | "karma-chrome-launcher": "~2.2.0",
41 | "karma-coverage-istanbul-reporter": "~2.0.1",
42 | "karma-jasmine": "~1.1.2",
43 | "karma-jasmine-html-reporter": "^0.2.2",
44 | "protractor": "~5.4.0",
45 | "ts-node": "~7.0.0",
46 | "tslint": "~5.11.0",
47 | "typescript": "~2.9.2"
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/examples/angular/src/app/app.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigooler/i18nh/48c0036bc54a770cb588e7812f8d72339930bd01/examples/angular/src/app/app.component.css
--------------------------------------------------------------------------------
/examples/angular/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{ "hello"|t }} (or {{ "hello"|t:'pt' }}) to {{ title }}!
5 |
6 |

7 |
8 | Here are some links to help you start:
9 |
10 | -
11 |
12 |
13 | -
14 |
15 |
16 | -
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/examples/angular/src/app/app.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { TestBed, async } from '@angular/core/testing';
2 | import { AppComponent } from './app.component';
3 |
4 | describe('AppComponent', () => {
5 | beforeEach(async(() => {
6 | TestBed.configureTestingModule({
7 | declarations: [
8 | AppComponent
9 | ],
10 | }).compileComponents();
11 | }));
12 |
13 | it('should create the app', () => {
14 | const fixture = TestBed.createComponent(AppComponent);
15 | const app = fixture.debugElement.componentInstance;
16 | expect(app).toBeTruthy();
17 | });
18 |
19 | it(`should have as title 'angular-example'`, () => {
20 | const fixture = TestBed.createComponent(AppComponent);
21 | const app = fixture.debugElement.componentInstance;
22 | expect(app.title).toEqual('angular-example');
23 | });
24 |
25 | it('should render title in a h1 tag', () => {
26 | const fixture = TestBed.createComponent(AppComponent);
27 | fixture.detectChanges();
28 | const compiled = fixture.debugElement.nativeElement;
29 | expect(compiled.querySelector('h1').textContent).toContain('Welcome to angular-example!');
30 | });
31 | });
32 |
--------------------------------------------------------------------------------
/examples/angular/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 |
4 | @Component({
5 | selector: 'app-root',
6 | templateUrl: './app.component.html',
7 | styleUrls: ['./app.component.css']
8 | })
9 | export class AppComponent {
10 | title = 'angular-example';
11 | }
12 |
--------------------------------------------------------------------------------
/examples/angular/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { BrowserModule } from '@angular/platform-browser';
2 | import { NgModule } from '@angular/core';
3 |
4 | import { AppComponent } from './app.component';
5 | import { I18nhPipe } from './i18nh.pipe';
6 |
7 | @NgModule({
8 | declarations: [
9 | AppComponent,
10 | I18nhPipe
11 | ],
12 | imports: [
13 | BrowserModule
14 | ],
15 | providers: [],
16 | bootstrap: [AppComponent]
17 | })
18 | export class AppModule { }
19 |
--------------------------------------------------------------------------------
/examples/angular/src/app/i18nh.map.ts:
--------------------------------------------------------------------------------
1 | export const languages = {
2 | en: {
3 | hello: 'Hello',
4 | about: 'About',
5 | goodMorning: 'Good Morning',
6 | },
7 | pt: {
8 | hello: 'Olá',
9 | about: 'Sobre',
10 | goodMorning: 'Bom Dia',
11 | },
12 | };
13 |
--------------------------------------------------------------------------------
/examples/angular/src/app/i18nh.pipe.spec.ts:
--------------------------------------------------------------------------------
1 | import { I18nhPipe } from './i18nh.pipe';
2 |
3 | describe('I18nhPipe', () => {
4 | it('create an instance', () => {
5 | const pipe = new I18nhPipe();
6 | expect(pipe).toBeTruthy();
7 | });
8 | });
9 |
--------------------------------------------------------------------------------
/examples/angular/src/app/i18nh.pipe.ts:
--------------------------------------------------------------------------------
1 | import { Pipe, PipeTransform } from '@angular/core';
2 | import {languages} from './i18nh.map';
3 | import i18nh, { useT } from 'i18nh';
4 |
5 |
6 |
7 | @Pipe({
8 | name: 't'
9 | })
10 | export class I18nhPipe implements PipeTransform {
11 |
12 | constructor() {
13 | i18nh({
14 | languages,
15 | defaultLanguage: 'en'
16 | });
17 | }
18 |
19 | transform(value: any, args?: any): any {
20 | const [t] = useT();
21 | return t(value, args);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/examples/angular/src/assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigooler/i18nh/48c0036bc54a770cb588e7812f8d72339930bd01/examples/angular/src/assets/.gitkeep
--------------------------------------------------------------------------------
/examples/angular/src/browserslist:
--------------------------------------------------------------------------------
1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 | #
5 | # For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed
6 |
7 | > 0.5%
8 | last 2 versions
9 | Firefox ESR
10 | not dead
11 | not IE 9-11
--------------------------------------------------------------------------------
/examples/angular/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: true
3 | };
4 |
--------------------------------------------------------------------------------
/examples/angular/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // This file can be replaced during build by using the `fileReplacements` array.
2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
3 | // The list of file replacements can be found in `angular.json`.
4 |
5 | export const environment = {
6 | production: false
7 | };
8 |
9 | /*
10 | * For easier debugging in development mode, you can import the following file
11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
12 | *
13 | * This import should be commented out in production mode because it will have a negative impact
14 | * on performance if an error is thrown.
15 | */
16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI.
17 |
--------------------------------------------------------------------------------
/examples/angular/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigooler/i18nh/48c0036bc54a770cb588e7812f8d72339930bd01/examples/angular/src/favicon.ico
--------------------------------------------------------------------------------
/examples/angular/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | AngularExample
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/examples/angular/src/karma.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration file, see link for more information
2 | // https://karma-runner.github.io/1.0/config/configuration-file.html
3 |
4 | module.exports = function (config) {
5 | config.set({
6 | basePath: '',
7 | frameworks: ['jasmine', '@angular-devkit/build-angular'],
8 | plugins: [
9 | require('karma-jasmine'),
10 | require('karma-chrome-launcher'),
11 | require('karma-jasmine-html-reporter'),
12 | require('karma-coverage-istanbul-reporter'),
13 | require('@angular-devkit/build-angular/plugins/karma')
14 | ],
15 | client: {
16 | clearContext: false // leave Jasmine Spec Runner output visible in browser
17 | },
18 | coverageIstanbulReporter: {
19 | dir: require('path').join(__dirname, '../coverage'),
20 | reports: ['html', 'lcovonly'],
21 | fixWebpackSourcePaths: true
22 | },
23 | reporters: ['progress', 'kjhtml'],
24 | port: 9876,
25 | colors: true,
26 | logLevel: config.LOG_INFO,
27 | autoWatch: true,
28 | browsers: ['Chrome'],
29 | singleRun: false
30 | });
31 | };
--------------------------------------------------------------------------------
/examples/angular/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.error(err));
13 |
14 |
--------------------------------------------------------------------------------
/examples/angular/src/polyfills.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * This file includes polyfills needed by Angular and is loaded before the app.
3 | * You can add your own extra polyfills to this file.
4 | *
5 | * This file is divided into 2 sections:
6 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
7 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
8 | * file.
9 | *
10 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
11 | * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
12 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
13 | *
14 | * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
15 | */
16 |
17 | /***************************************************************************************************
18 | * BROWSER POLYFILLS
19 | */
20 |
21 | /** IE9, IE10 and IE11 requires all of the following polyfills. **/
22 | // import 'core-js/es6/symbol';
23 | // import 'core-js/es6/object';
24 | // import 'core-js/es6/function';
25 | // import 'core-js/es6/parse-int';
26 | // import 'core-js/es6/parse-float';
27 | // import 'core-js/es6/number';
28 | // import 'core-js/es6/math';
29 | // import 'core-js/es6/string';
30 | // import 'core-js/es6/date';
31 | // import 'core-js/es6/array';
32 | // import 'core-js/es6/regexp';
33 | // import 'core-js/es6/map';
34 | // import 'core-js/es6/weak-map';
35 | // import 'core-js/es6/set';
36 |
37 | /** IE10 and IE11 requires the following for NgClass support on SVG elements */
38 | // import 'classlist.js'; // Run `npm install --save classlist.js`.
39 |
40 | /** IE10 and IE11 requires the following for the Reflect API. */
41 | // import 'core-js/es6/reflect';
42 |
43 |
44 | /** Evergreen browsers require these. **/
45 | // Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
46 | import 'core-js/es7/reflect';
47 |
48 |
49 | /**
50 | * Web Animations `@angular/platform-browser/animations`
51 | * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
52 | * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
53 | **/
54 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`.
55 |
56 | /**
57 | * By default, zone.js will patch all possible macroTask and DomEvents
58 | * user can disable parts of macroTask/DomEvents patch by setting following flags
59 | */
60 |
61 | // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
62 | // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
63 | // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
64 |
65 | /*
66 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
67 | * with the following flag, it will bypass `zone.js` patch for IE/Edge
68 | */
69 | // (window as any).__Zone_enable_cross_context_check = true;
70 |
71 | /***************************************************************************************************
72 | * Zone JS is required by default for Angular itself.
73 | */
74 | import 'zone.js/dist/zone'; // Included with Angular CLI.
75 |
76 |
77 |
78 | /***************************************************************************************************
79 | * APPLICATION IMPORTS
80 | */
81 |
--------------------------------------------------------------------------------
/examples/angular/src/styles.css:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 |
--------------------------------------------------------------------------------
/examples/angular/src/test.ts:
--------------------------------------------------------------------------------
1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2 |
3 | import 'zone.js/dist/zone-testing';
4 | import { getTestBed } from '@angular/core/testing';
5 | import {
6 | BrowserDynamicTestingModule,
7 | platformBrowserDynamicTesting
8 | } from '@angular/platform-browser-dynamic/testing';
9 |
10 | declare const require: any;
11 |
12 | // First, initialize the Angular testing environment.
13 | getTestBed().initTestEnvironment(
14 | BrowserDynamicTestingModule,
15 | platformBrowserDynamicTesting()
16 | );
17 | // Then we find all the tests.
18 | const context = require.context('./', true, /\.spec\.ts$/);
19 | // And load the modules.
20 | context.keys().map(context);
21 |
--------------------------------------------------------------------------------
/examples/angular/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "types": []
6 | },
7 | "exclude": [
8 | "test.ts",
9 | "**/*.spec.ts"
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/examples/angular/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "types": [
6 | "jasmine",
7 | "node"
8 | ]
9 | },
10 | "files": [
11 | "test.ts",
12 | "polyfills.ts"
13 | ],
14 | "include": [
15 | "**/*.spec.ts",
16 | "**/*.d.ts"
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/examples/angular/src/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "app",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "app",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/examples/angular/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist/out-tsc",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "module": "es2015",
9 | "moduleResolution": "node",
10 | "emitDecoratorMetadata": true,
11 | "experimentalDecorators": true,
12 | "target": "es5",
13 | "typeRoots": [
14 | "node_modules/@types"
15 | ],
16 | "lib": [
17 | "es2017",
18 | "dom"
19 | ]
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/examples/angular/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "rulesDirectory": [
3 | "node_modules/codelyzer"
4 | ],
5 | "rules": {
6 | "arrow-return-shorthand": true,
7 | "callable-types": true,
8 | "class-name": true,
9 | "comment-format": [
10 | true,
11 | "check-space"
12 | ],
13 | "curly": true,
14 | "deprecation": {
15 | "severity": "warn"
16 | },
17 | "eofline": true,
18 | "forin": true,
19 | "import-blacklist": [
20 | true,
21 | "rxjs/Rx"
22 | ],
23 | "import-spacing": true,
24 | "indent": [
25 | true,
26 | "spaces"
27 | ],
28 | "interface-over-type-literal": true,
29 | "label-position": true,
30 | "max-line-length": [
31 | true,
32 | 140
33 | ],
34 | "member-access": false,
35 | "member-ordering": [
36 | true,
37 | {
38 | "order": [
39 | "static-field",
40 | "instance-field",
41 | "static-method",
42 | "instance-method"
43 | ]
44 | }
45 | ],
46 | "no-arg": true,
47 | "no-bitwise": true,
48 | "no-console": [
49 | true,
50 | "debug",
51 | "info",
52 | "time",
53 | "timeEnd",
54 | "trace"
55 | ],
56 | "no-construct": true,
57 | "no-debugger": true,
58 | "no-duplicate-super": true,
59 | "no-empty": false,
60 | "no-empty-interface": true,
61 | "no-eval": true,
62 | "no-inferrable-types": [
63 | true,
64 | "ignore-params"
65 | ],
66 | "no-misused-new": true,
67 | "no-non-null-assertion": true,
68 | "no-redundant-jsdoc": true,
69 | "no-shadowed-variable": true,
70 | "no-string-literal": false,
71 | "no-string-throw": true,
72 | "no-switch-case-fall-through": true,
73 | "no-trailing-whitespace": true,
74 | "no-unnecessary-initializer": true,
75 | "no-unused-expression": true,
76 | "no-use-before-declare": true,
77 | "no-var-keyword": true,
78 | "object-literal-sort-keys": false,
79 | "one-line": [
80 | true,
81 | "check-open-brace",
82 | "check-catch",
83 | "check-else",
84 | "check-whitespace"
85 | ],
86 | "prefer-const": true,
87 | "quotemark": [
88 | true,
89 | "single"
90 | ],
91 | "radix": true,
92 | "semicolon": [
93 | true,
94 | "always"
95 | ],
96 | "triple-equals": [
97 | true,
98 | "allow-null-check"
99 | ],
100 | "typedef-whitespace": [
101 | true,
102 | {
103 | "call-signature": "nospace",
104 | "index-signature": "nospace",
105 | "parameter": "nospace",
106 | "property-declaration": "nospace",
107 | "variable-declaration": "nospace"
108 | }
109 | ],
110 | "unified-signatures": true,
111 | "variable-name": false,
112 | "whitespace": [
113 | true,
114 | "check-branch",
115 | "check-decl",
116 | "check-operator",
117 | "check-separator",
118 | "check-type"
119 | ],
120 | "no-output-on-prefix": true,
121 | "use-input-property-decorator": true,
122 | "use-output-property-decorator": true,
123 | "use-host-property-decorator": true,
124 | "no-input-rename": true,
125 | "no-output-rename": true,
126 | "use-life-cycle-interface": true,
127 | "use-pipe-transform-interface": true,
128 | "component-class-suffix": true,
129 | "directive-class-suffix": true
130 | }
131 | }
132 |
--------------------------------------------------------------------------------
/examples/nextjs/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "with-i18nh",
3 | "version": "0.0.1",
4 | "dependencies": {
5 | "i18nh": "0.0.2",
6 | "next": "7.0.2",
7 | "react": "16.6.0",
8 | "react-dom": "16.6.0"
9 | },
10 | "scripts": {
11 | "build": "next build",
12 | "dev": "next",
13 | "start": "next start"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/examples/nextjs/pages/_app.js:
--------------------------------------------------------------------------------
1 | import App, { Container } from "next/app";
2 | import React from "react";
3 | import i18nh from "i18nh";
4 |
5 | const languages = {
6 | en: {
7 | welcomeNext: "Welcome to Next!",
8 | getStarted: "To get started, edit ",
9 | saveReload: "and save to reload."
10 | },
11 | pt: {
12 | welcomeNext: "Bem vindo ao Next!",
13 | getStarted: "Para começar, edite ",
14 | saveReload: "e salve para recarregar."
15 | },
16 | ch: {
17 | welcomeNext: "歡迎來到 Next!",
18 | getStarted: "要開始,請編輯 ",
19 | saveReload: "並保存以重新加載。"
20 | }
21 | };
22 |
23 | i18nh({ languages, defaultLanguage: "en", activeDebug: false });
24 |
25 | export default class extends App {
26 | static async getInitialProps({ Component, ctx }) {
27 | const pageProps = Component.getInitialProps
28 | ? await Component.getInitialProps(ctx)
29 | : {};
30 |
31 | return { pageProps };
32 | }
33 |
34 | render() {
35 | const { Component, pageProps } = this.props;
36 | return (
37 |
38 |
39 |
40 | );
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/examples/nextjs/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { useT } from "i18nh";
3 |
4 | const [t] = useT();
5 |
6 | const Home = () => (
7 |
8 |
9 |
{t("welcomeNext")}
10 |
11 | {t("getStarted")}
12 | pages/index.js
{t("saveReload")}
13 |
14 |
15 |
16 |
17 |
{t("welcomeNext", "pt")}
18 |
19 | {t("getStarted", "pt")}
20 | pages/index.js
{t("saveReload", "pt")}
21 |
22 |
23 |
24 |
25 |
{t("welcomeNext", "ch")}
26 |
27 | {t("getStarted", "ch")}
28 | pages/index.js
{t("saveReload", "ch")}
29 |
30 |
31 |
32 |
49 |
50 | );
51 |
52 | export default Home;
53 |
--------------------------------------------------------------------------------
/examples/node/index.js:
--------------------------------------------------------------------------------
1 | const i18nh = require('../..')
2 | const { useT } = require('../..')
3 |
4 | const languages = {
5 | en: {
6 | hello: 'Hello',
7 | about: 'About',
8 | goodMorning: 'Good Morning',
9 | },
10 | pt: {
11 | hello: 'Olá',
12 | about: 'Sobre',
13 | goodMorning: 'Bom Dia',
14 | },
15 | }
16 |
17 | i18nh({
18 | languages,
19 | defaultLanguage: 'en'
20 | });
21 |
22 | const [t] = useT();
23 |
24 | console.log(t('hello'))
25 | console.log(t('about'))
26 | console.log(t('goodMorning'))
27 |
28 | console.log(t('hello', 'pt'))
29 | console.log(t('about', 'pt'))
30 | console.log(t('goodMorning', 'pt'))
--------------------------------------------------------------------------------
/examples/react-amazon-translate/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/examples/react-amazon-translate/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "type": "chrome",
9 | "request": "launch",
10 | "name": "Launch Chrome",
11 | "url": "http://localhost:8080",
12 | "webRoot": "${workspaceFolder}"
13 | }
14 | ]
15 | }
--------------------------------------------------------------------------------
/examples/react-amazon-translate/README.md:
--------------------------------------------------------------------------------
1 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
2 |
3 | ## Available Scripts
4 |
5 | In the project directory, you can run:
6 |
7 | ### `npm start`
8 |
9 | Runs the app in the development mode.
10 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
11 |
12 | The page will reload if you make edits.
13 | You will also see any lint errors in the console.
14 |
15 | ### `npm test`
16 |
17 | Launches the test runner in the interactive watch mode.
18 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
19 |
20 | ### `npm run build`
21 |
22 | Builds the app for production to the `build` folder.
23 | It correctly bundles React in production mode and optimizes the build for the best performance.
24 |
25 | The build is minified and the filenames include the hashes.
26 | Your app is ready to be deployed!
27 |
28 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
29 |
30 | ### `npm run eject`
31 |
32 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!**
33 |
34 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
35 |
36 | Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
37 |
38 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
39 |
40 | ## Learn More
41 |
42 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
43 |
44 | To learn React, check out the [React documentation](https://reactjs.org/).
45 |
--------------------------------------------------------------------------------
/examples/react-amazon-translate/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-amazon-translate",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "dotenv": "^6.1.0",
7 | "i18nh": "file:../..",
8 | "react": "^16.6.0",
9 | "react-dom": "^16.6.0",
10 | "react-promise": "^2.0.3",
11 | "react-scripts": "2.1.1"
12 | },
13 | "scripts": {
14 | "start": "react-scripts start",
15 | "build": "react-scripts build",
16 | "test": "react-scripts test",
17 | "eject": "react-scripts eject"
18 | },
19 | "eslintConfig": {
20 | "extends": "react-app"
21 | },
22 | "browserslist": [
23 | ">0.2%",
24 | "not dead",
25 | "not ie <= 11",
26 | "not op_mini all"
27 | ]
28 | }
29 |
--------------------------------------------------------------------------------
/examples/react-amazon-translate/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigooler/i18nh/48c0036bc54a770cb588e7812f8d72339930bd01/examples/react-amazon-translate/public/favicon.ico
--------------------------------------------------------------------------------
/examples/react-amazon-translate/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
22 | React App
23 |
24 |
25 |
28 |
29 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/examples/react-amazon-translate/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | }
10 | ],
11 | "start_url": ".",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
16 |
--------------------------------------------------------------------------------
/examples/react-amazon-translate/src/App.css:
--------------------------------------------------------------------------------
1 | .App {
2 | text-align: center;
3 | }
4 |
5 | .App-logo {
6 | animation: App-logo-spin infinite 20s linear;
7 | height: 40vmin;
8 | }
9 |
10 | .App-header {
11 | background-color: #282c34;
12 | min-height: 100vh;
13 | display: flex;
14 | flex-direction: column;
15 | align-items: center;
16 | justify-content: center;
17 | font-size: calc(10px + 2vmin);
18 | color: white;
19 | }
20 |
21 | .App-link {
22 | color: #61dafb;
23 | }
24 |
25 | @keyframes App-logo-spin {
26 | from {
27 | transform: rotate(0deg);
28 | }
29 | to {
30 | transform: rotate(360deg);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/examples/react-amazon-translate/src/App.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import logo from './logo.svg';
3 | import './App.css';
4 | import config from 'dotenv';
5 | import Async from 'react-promise';
6 | import {AzureTranslate} from 'i18nh';
7 |
8 | config.config();
9 |
10 | const translations = {
11 | message: "Translated using Microsoft Azure"
12 | }
13 |
14 | class App extends Component {
15 | render() {
16 | const translationEngine = new AzureTranslate(process.env.REACT_APP_AZURE_API_KEY_2, false);
17 | return (
18 |
19 |
20 |
21 |
22 | { val }
} />
23 | src/App.js and save to reload.", from: 'en', to: 'pt'})} then={val => {val}
}/>
24 |
25 |
31 | Learn React
32 |
33 |
34 |
35 | );
36 | }
37 | }
38 |
39 | export default App;
40 |
--------------------------------------------------------------------------------
/examples/react-amazon-translate/src/App.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | it('renders without crashing', () => {
6 | const div = document.createElement('div');
7 | ReactDOM.render(, div);
8 | ReactDOM.unmountComponentAtNode(div);
9 | });
10 |
--------------------------------------------------------------------------------
/examples/react-amazon-translate/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | padding: 0;
4 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
5 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
6 | sans-serif;
7 | -webkit-font-smoothing: antialiased;
8 | -moz-osx-font-smoothing: grayscale;
9 | }
10 |
11 | code {
12 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
13 | monospace;
14 | }
15 |
--------------------------------------------------------------------------------
/examples/react-amazon-translate/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import './index.css';
4 | import App from './App';
5 | import * as serviceWorker from './serviceWorker';
6 |
7 | ReactDOM.render(, document.getElementById('root'));
8 |
9 | // If you want your app to work offline and load faster, you can change
10 | // unregister() to register() below. Note this comes with some pitfalls.
11 | // Learn more about service workers: http://bit.ly/CRA-PWA
12 | serviceWorker.unregister();
13 |
--------------------------------------------------------------------------------
/examples/react-amazon-translate/src/logo.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/examples/react-amazon-translate/src/serviceWorker.js:
--------------------------------------------------------------------------------
1 | // This optional code is used to register a service worker.
2 | // register() is not called by default.
3 |
4 | // This lets the app load faster on subsequent visits in production, and gives
5 | // it offline capabilities. However, it also means that developers (and users)
6 | // will only see deployed updates on subsequent visits to a page, after all the
7 | // existing tabs open on the page have been closed, since previously cached
8 | // resources are updated in the background.
9 |
10 | // To learn more about the benefits of this model and instructions on how to
11 | // opt-in, read http://bit.ly/CRA-PWA
12 |
13 | const isLocalhost = Boolean(
14 | window.location.hostname === 'localhost' ||
15 | // [::1] is the IPv6 localhost address.
16 | window.location.hostname === '[::1]' ||
17 | // 127.0.0.1/8 is considered localhost for IPv4.
18 | window.location.hostname.match(
19 | /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
20 | )
21 | );
22 |
23 | export function register(config) {
24 | if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
25 | // The URL constructor is available in all browsers that support SW.
26 | const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
27 | if (publicUrl.origin !== window.location.origin) {
28 | // Our service worker won't work if PUBLIC_URL is on a different origin
29 | // from what our page is served on. This might happen if a CDN is used to
30 | // serve assets; see https://github.com/facebook/create-react-app/issues/2374
31 | return;
32 | }
33 |
34 | window.addEventListener('load', () => {
35 | const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
36 |
37 | if (isLocalhost) {
38 | // This is running on localhost. Let's check if a service worker still exists or not.
39 | checkValidServiceWorker(swUrl, config);
40 |
41 | // Add some additional logging to localhost, pointing developers to the
42 | // service worker/PWA documentation.
43 | navigator.serviceWorker.ready.then(() => {
44 | console.log(
45 | 'This web app is being served cache-first by a service ' +
46 | 'worker. To learn more, visit http://bit.ly/CRA-PWA'
47 | );
48 | });
49 | } else {
50 | // Is not localhost. Just register service worker
51 | registerValidSW(swUrl, config);
52 | }
53 | });
54 | }
55 | }
56 |
57 | function registerValidSW(swUrl, config) {
58 | navigator.serviceWorker
59 | .register(swUrl)
60 | .then(registration => {
61 | registration.onupdatefound = () => {
62 | const installingWorker = registration.installing;
63 | if (installingWorker == null) {
64 | return;
65 | }
66 | installingWorker.onstatechange = () => {
67 | if (installingWorker.state === 'installed') {
68 | if (navigator.serviceWorker.controller) {
69 | // At this point, the updated precached content has been fetched,
70 | // but the previous service worker will still serve the older
71 | // content until all client tabs are closed.
72 | console.log(
73 | 'New content is available and will be used when all ' +
74 | 'tabs for this page are closed. See http://bit.ly/CRA-PWA.'
75 | );
76 |
77 | // Execute callback
78 | if (config && config.onUpdate) {
79 | config.onUpdate(registration);
80 | }
81 | } else {
82 | // At this point, everything has been precached.
83 | // It's the perfect time to display a
84 | // "Content is cached for offline use." message.
85 | console.log('Content is cached for offline use.');
86 |
87 | // Execute callback
88 | if (config && config.onSuccess) {
89 | config.onSuccess(registration);
90 | }
91 | }
92 | }
93 | };
94 | };
95 | })
96 | .catch(error => {
97 | console.error('Error during service worker registration:', error);
98 | });
99 | }
100 |
101 | function checkValidServiceWorker(swUrl, config) {
102 | // Check if the service worker can be found. If it can't reload the page.
103 | fetch(swUrl)
104 | .then(response => {
105 | // Ensure service worker exists, and that we really are getting a JS file.
106 | const contentType = response.headers.get('content-type');
107 | if (
108 | response.status === 404 ||
109 | (contentType != null && contentType.indexOf('javascript') === -1)
110 | ) {
111 | // No service worker found. Probably a different app. Reload the page.
112 | navigator.serviceWorker.ready.then(registration => {
113 | registration.unregister().then(() => {
114 | window.location.reload();
115 | });
116 | });
117 | } else {
118 | // Service worker found. Proceed as normal.
119 | registerValidSW(swUrl, config);
120 | }
121 | })
122 | .catch(() => {
123 | console.log(
124 | 'No internet connection found. App is running in offline mode.'
125 | );
126 | });
127 | }
128 |
129 | export function unregister() {
130 | if ('serviceWorker' in navigator) {
131 | navigator.serviceWorker.ready.then(registration => {
132 | registration.unregister();
133 | });
134 | }
135 | }
136 |
--------------------------------------------------------------------------------
/examples/react-native-example/.expo/packager-info.json:
--------------------------------------------------------------------------------
1 | {
2 | "devToolsPort": 19002,
3 | "expoServerPort": 19000,
4 | "expoServerNgrokUrl": null,
5 | "packagerNgrokUrl": null,
6 | "ngrokPid": null,
7 | "packagerPort": 19001,
8 | "packagerPid": 10778
9 | }
--------------------------------------------------------------------------------
/examples/react-native-example/.expo/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "hostType": "lan",
3 | "lanType": "ip",
4 | "dev": true,
5 | "minify": false,
6 | "urlRandomness": null
7 | }
--------------------------------------------------------------------------------
/examples/react/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/examples/react/README.md:
--------------------------------------------------------------------------------
1 | # Create-React-App-Example
2 |
3 | Download the requirements.
4 | > npm install
5 |
6 | Start demo with
7 | > npm start
--------------------------------------------------------------------------------
/examples/react/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-example",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "i18nh": "0.0.3",
7 | "react": "^16.6.0",
8 | "react-dom": "^16.6.0",
9 | "react-scripts": "2.1.0"
10 | },
11 | "scripts": {
12 | "start": "react-scripts start",
13 | "build": "react-scripts build",
14 | "test": "react-scripts test",
15 | "eject": "react-scripts eject"
16 | },
17 | "eslintConfig": {
18 | "extends": "react-app"
19 | },
20 | "browserslist": [
21 | ">0.2%",
22 | "not dead",
23 | "not ie <= 11",
24 | "not op_mini all"
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/examples/react/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigooler/i18nh/48c0036bc54a770cb588e7812f8d72339930bd01/examples/react/public/favicon.ico
--------------------------------------------------------------------------------
/examples/react/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
22 | React App
23 |
24 |
25 |
28 |
29 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/examples/react/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | }
10 | ],
11 | "start_url": ".",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
16 |
--------------------------------------------------------------------------------
/examples/react/src/App.css:
--------------------------------------------------------------------------------
1 | .App {
2 | text-align: center;
3 | }
4 |
5 | .App-logo {
6 | animation: App-logo-spin infinite 20s linear;
7 | height: 40vmin;
8 | }
9 |
10 | .App-header {
11 | background-color: #282c34;
12 | min-height: 100vh;
13 | display: flex;
14 | flex-direction: column;
15 | align-items: center;
16 | justify-content: center;
17 | font-size: calc(10px + 2vmin);
18 | color: white;
19 | }
20 |
21 | .App-link {
22 | color: #61dafb;
23 | }
24 |
25 | @keyframes App-logo-spin {
26 | from {
27 | transform: rotate(0deg);
28 | }
29 | to {
30 | transform: rotate(360deg);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/examples/react/src/App.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import logo from './logo.svg';
3 | import './App.css';
4 | import i18nh, { useT } from 'i18nh'
5 |
6 | const languages = {
7 | en: {
8 | edit: 'Edit',
9 | saveToReload: 'and save to reload',
10 | message: 'Translated using defaultLanguage configuration'
11 | },
12 | pt: {
13 | edit: 'Altere',
14 | saveToReload: 'e salve para atualizar',
15 | message: 'Traduzido usando o idioma informado.'
16 | }
17 | }
18 |
19 | class App extends Component {
20 | constructor () {
21 | super ();
22 | i18nh({
23 | languages,
24 | defaultLanguage: 'en'
25 | });
26 | }
27 |
28 | render() {
29 | const [t] = useT();
30 |
31 | return (
32 |
51 | );
52 | }
53 | }
54 |
55 | export default App;
56 |
--------------------------------------------------------------------------------
/examples/react/src/App.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | it('renders without crashing', () => {
6 | const div = document.createElement('div');
7 | ReactDOM.render(, div);
8 | ReactDOM.unmountComponentAtNode(div);
9 | });
10 |
--------------------------------------------------------------------------------
/examples/react/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | padding: 0;
4 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
5 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
6 | sans-serif;
7 | -webkit-font-smoothing: antialiased;
8 | -moz-osx-font-smoothing: grayscale;
9 | }
10 |
11 | code {
12 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
13 | monospace;
14 | }
15 |
--------------------------------------------------------------------------------
/examples/react/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import './index.css';
4 | import App from './App';
5 | import * as serviceWorker from './serviceWorker';
6 |
7 | ReactDOM.render(, document.getElementById('root'));
8 |
9 | // If you want your app to work offline and load faster, you can change
10 | // unregister() to register() below. Note this comes with some pitfalls.
11 | // Learn more about service workers: http://bit.ly/CRA-PWA
12 | serviceWorker.unregister();
13 |
--------------------------------------------------------------------------------
/examples/react/src/logo.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/examples/react/src/serviceWorker.js:
--------------------------------------------------------------------------------
1 | // This optional code is used to register a service worker.
2 | // register() is not called by default.
3 |
4 | // This lets the app load faster on subsequent visits in production, and gives
5 | // it offline capabilities. However, it also means that developers (and users)
6 | // will only see deployed updates on subsequent visits to a page, after all the
7 | // existing tabs open on the page have been closed, since previously cached
8 | // resources are updated in the background.
9 |
10 | // To learn more about the benefits of this model and instructions on how to
11 | // opt-in, read http://bit.ly/CRA-PWA
12 |
13 | const isLocalhost = Boolean(
14 | window.location.hostname === 'localhost' ||
15 | // [::1] is the IPv6 localhost address.
16 | window.location.hostname === '[::1]' ||
17 | // 127.0.0.1/8 is considered localhost for IPv4.
18 | window.location.hostname.match(
19 | /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
20 | )
21 | );
22 |
23 | export function register(config) {
24 | if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
25 | // The URL constructor is available in all browsers that support SW.
26 | const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
27 | if (publicUrl.origin !== window.location.origin) {
28 | // Our service worker won't work if PUBLIC_URL is on a different origin
29 | // from what our page is served on. This might happen if a CDN is used to
30 | // serve assets; see https://github.com/facebook/create-react-app/issues/2374
31 | return;
32 | }
33 |
34 | window.addEventListener('load', () => {
35 | const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
36 |
37 | if (isLocalhost) {
38 | // This is running on localhost. Let's check if a service worker still exists or not.
39 | checkValidServiceWorker(swUrl, config);
40 |
41 | // Add some additional logging to localhost, pointing developers to the
42 | // service worker/PWA documentation.
43 | navigator.serviceWorker.ready.then(() => {
44 | console.log(
45 | 'This web app is being served cache-first by a service ' +
46 | 'worker. To learn more, visit http://bit.ly/CRA-PWA'
47 | );
48 | });
49 | } else {
50 | // Is not localhost. Just register service worker
51 | registerValidSW(swUrl, config);
52 | }
53 | });
54 | }
55 | }
56 |
57 | function registerValidSW(swUrl, config) {
58 | navigator.serviceWorker
59 | .register(swUrl)
60 | .then(registration => {
61 | registration.onupdatefound = () => {
62 | const installingWorker = registration.installing;
63 | if (installingWorker == null) {
64 | return;
65 | }
66 | installingWorker.onstatechange = () => {
67 | if (installingWorker.state === 'installed') {
68 | if (navigator.serviceWorker.controller) {
69 | // At this point, the updated precached content has been fetched,
70 | // but the previous service worker will still serve the older
71 | // content until all client tabs are closed.
72 | console.log(
73 | 'New content is available and will be used when all ' +
74 | 'tabs for this page are closed. See http://bit.ly/CRA-PWA.'
75 | );
76 |
77 | // Execute callback
78 | if (config && config.onUpdate) {
79 | config.onUpdate(registration);
80 | }
81 | } else {
82 | // At this point, everything has been precached.
83 | // It's the perfect time to display a
84 | // "Content is cached for offline use." message.
85 | console.log('Content is cached for offline use.');
86 |
87 | // Execute callback
88 | if (config && config.onSuccess) {
89 | config.onSuccess(registration);
90 | }
91 | }
92 | }
93 | };
94 | };
95 | })
96 | .catch(error => {
97 | console.error('Error during service worker registration:', error);
98 | });
99 | }
100 |
101 | function checkValidServiceWorker(swUrl, config) {
102 | // Check if the service worker can be found. If it can't reload the page.
103 | fetch(swUrl)
104 | .then(response => {
105 | // Ensure service worker exists, and that we really are getting a JS file.
106 | const contentType = response.headers.get('content-type');
107 | if (
108 | response.status === 404 ||
109 | (contentType != null && contentType.indexOf('javascript') === -1)
110 | ) {
111 | // No service worker found. Probably a different app. Reload the page.
112 | navigator.serviceWorker.ready.then(registration => {
113 | registration.unregister().then(() => {
114 | window.location.reload();
115 | });
116 | });
117 | } else {
118 | // Service worker found. Proceed as normal.
119 | registerValidSW(swUrl, config);
120 | }
121 | })
122 | .catch(() => {
123 | console.log(
124 | 'No internet connection found. App is running in offline mode.'
125 | );
126 | });
127 | }
128 |
129 | export function unregister() {
130 | if ('serviceWorker' in navigator) {
131 | navigator.serviceWorker.ready.then(registration => {
132 | registration.unregister();
133 | });
134 | }
135 | }
136 |
--------------------------------------------------------------------------------
/examples/reactnative/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["module:metro-react-native-babel-preset"]
3 | }
4 |
--------------------------------------------------------------------------------
/examples/reactnative/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/examples/reactnative/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | ; We fork some components by platform
3 | .*/*[.]android.js
4 |
5 | ; Ignore "BUCK" generated dirs
6 | /\.buckd/
7 |
8 | ; Ignore unexpected extra "@providesModule"
9 | .*/node_modules/.*/node_modules/fbjs/.*
10 |
11 | ; Ignore duplicate module providers
12 | ; For RN Apps installed via npm, "Libraries" folder is inside
13 | ; "node_modules/react-native" but in the source repo it is in the root
14 | .*/Libraries/react-native/React.js
15 |
16 | ; Ignore polyfills
17 | .*/Libraries/polyfills/.*
18 |
19 | ; Ignore metro
20 | .*/node_modules/metro/.*
21 |
22 | [include]
23 |
24 | [libs]
25 | node_modules/react-native/Libraries/react-native/react-native-interface.js
26 | node_modules/react-native/flow/
27 | node_modules/react-native/flow-github/
28 |
29 | [options]
30 | emoji=true
31 |
32 | esproposal.optional_chaining=enable
33 | esproposal.nullish_coalescing=enable
34 |
35 | module.system=haste
36 | module.system.haste.use_name_reducers=true
37 | # get basename
38 | module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
39 | # strip .js or .js.flow suffix
40 | module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
41 | # strip .ios suffix
42 | module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
43 | module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
44 | module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
45 | module.system.haste.paths.blacklist=.*/__tests__/.*
46 | module.system.haste.paths.blacklist=.*/__mocks__/.*
47 | module.system.haste.paths.blacklist=/node_modules/react-native/Libraries/Animated/src/polyfills/.*
48 | module.system.haste.paths.whitelist=/node_modules/react-native/Libraries/.*
49 |
50 | munge_underscores=true
51 |
52 | 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\)$' -> 'RelativeImageStub'
53 |
54 | module.file_ext=.js
55 | module.file_ext=.jsx
56 | module.file_ext=.json
57 | module.file_ext=.native.js
58 |
59 | suppress_type=$FlowIssue
60 | suppress_type=$FlowFixMe
61 | suppress_type=$FlowFixMeProps
62 | suppress_type=$FlowFixMeState
63 |
64 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
65 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
66 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
67 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
68 |
69 | [version]
70 | ^0.78.0
71 |
--------------------------------------------------------------------------------
/examples/reactnative/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -text
2 |
--------------------------------------------------------------------------------
/examples/reactnative/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 | project.xcworkspace
24 |
25 | # Android/IntelliJ
26 | #
27 | build/
28 | .idea
29 | .gradle
30 | local.properties
31 | *.iml
32 |
33 | # node.js
34 | #
35 | node_modules/
36 | npm-debug.log
37 | yarn-error.log
38 |
39 | # BUCK
40 | buck-out/
41 | \.buckd/
42 | *.keystore
43 |
44 | # fastlane
45 | #
46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47 | # screenshots whenever they are needed.
48 | # For more information about the recommended setup visit:
49 | # https://docs.fastlane.tools/best-practices/source-control/
50 |
51 | */fastlane/report.xml
52 | */fastlane/Preview.html
53 | */fastlane/screenshots
54 |
55 | # Bundle artifact
56 | *.jsbundle
57 |
--------------------------------------------------------------------------------
/examples/reactnative/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/examples/reactnative/App.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Sample React Native App
3 | * https://github.com/facebook/react-native
4 | *
5 | * @format
6 | * @flow
7 | */
8 |
9 | import React, {Component} from 'react';
10 | import {StyleSheet, Text, View} from 'react-native';
11 | import i18nh, { useT } from 'i18nh'
12 |
13 | const languages = {
14 | en: {
15 | message: 'Translated using defaultLanguage configuration'
16 | },
17 | pt: {
18 | message: 'Traduzido usando o idioma informado.'
19 | }
20 | }
21 |
22 | export default class App extends Component {
23 | constructor () {
24 | super ();
25 | i18nh({
26 | languages,
27 | defaultLanguage: 'en'
28 | });
29 | }
30 | render() {
31 | const [t] = useT();
32 |
33 | return (
34 |
35 | {t('message')}
36 | {t('message', 'pt')}
37 |
38 | );
39 | }
40 | }
41 |
42 | const styles = StyleSheet.create({
43 | container: {
44 | flex: 1,
45 | justifyContent: 'center',
46 | alignItems: 'center',
47 | backgroundColor: '#F5FCFF',
48 | },
49 | welcome: {
50 | fontSize: 20,
51 | textAlign: 'center',
52 | margin: 10,
53 | },
54 | instructions: {
55 | textAlign: 'center',
56 | color: '#333333',
57 | marginBottom: 5,
58 | },
59 | });
60 |
--------------------------------------------------------------------------------
/examples/reactnative/README.md:
--------------------------------------------------------------------------------
1 | # React Native Example
2 |
3 | Resolve Dependencies
4 | > npm install
5 |
6 | Start React Packager
7 | > react-native start
8 |
9 | Run at iOS Device
10 | >react-native run-ios
11 |
12 | Run at Android Device
13 | > react-native run-android
--------------------------------------------------------------------------------
/examples/reactnative/android/app/BUCK:
--------------------------------------------------------------------------------
1 | # To learn about Buck see [Docs](https://buckbuild.com/).
2 | # To run your application with Buck:
3 | # - install Buck
4 | # - `npm start` - to start the packager
5 | # - `cd android`
6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8 | # - `buck install -r android/app` - compile, install and run application
9 | #
10 |
11 | lib_deps = []
12 |
13 | for jarfile in glob(['libs/*.jar']):
14 | name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')]
15 | lib_deps.append(':' + name)
16 | prebuilt_jar(
17 | name = name,
18 | binary_jar = jarfile,
19 | )
20 |
21 | for aarfile in glob(['libs/*.aar']):
22 | name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')]
23 | lib_deps.append(':' + name)
24 | android_prebuilt_aar(
25 | name = name,
26 | aar = aarfile,
27 | )
28 |
29 | android_library(
30 | name = "all-libs",
31 | exported_deps = lib_deps,
32 | )
33 |
34 | android_library(
35 | name = "app-code",
36 | srcs = glob([
37 | "src/main/java/**/*.java",
38 | ]),
39 | deps = [
40 | ":all-libs",
41 | ":build_config",
42 | ":res",
43 | ],
44 | )
45 |
46 | android_build_config(
47 | name = "build_config",
48 | package = "com.rectnative",
49 | )
50 |
51 | android_resource(
52 | name = "res",
53 | package = "com.rectnative",
54 | res = "src/main/res",
55 | )
56 |
57 | android_binary(
58 | name = "app",
59 | keystore = "//android/keystores:debug",
60 | manifest = "src/main/AndroidManifest.xml",
61 | package_type = "debug",
62 | deps = [
63 | ":app-code",
64 | ],
65 | )
66 |
--------------------------------------------------------------------------------
/examples/reactnative/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "com.android.application"
2 |
3 | import com.android.build.OutputFile
4 |
5 | /**
6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
7 | * and bundleReleaseJsAndAssets).
8 | * These basically call `react-native bundle` with the correct arguments during the Android build
9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10 | * bundle directly from the development server. Below you can see all the possible configurations
11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the
12 | * `apply from: "../../node_modules/react-native/react.gradle"` line.
13 | *
14 | * project.ext.react = [
15 | * // the name of the generated asset file containing your JS bundle
16 | * bundleAssetName: "index.android.bundle",
17 | *
18 | * // the entry file for bundle generation
19 | * entryFile: "index.android.js",
20 | *
21 | * // whether to bundle JS and assets in debug mode
22 | * bundleInDebug: false,
23 | *
24 | * // whether to bundle JS and assets in release mode
25 | * bundleInRelease: true,
26 | *
27 | * // whether to bundle JS and assets in another build variant (if configured).
28 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
29 | * // The configuration property can be in the following formats
30 | * // 'bundleIn${productFlavor}${buildType}'
31 | * // 'bundleIn${buildType}'
32 | * // bundleInFreeDebug: true,
33 | * // bundleInPaidRelease: true,
34 | * // bundleInBeta: true,
35 | *
36 | * // whether to disable dev mode in custom build variants (by default only disabled in release)
37 | * // for example: to disable dev mode in the staging build type (if configured)
38 | * devDisabledInStaging: true,
39 | * // The configuration property can be in the following formats
40 | * // 'devDisabledIn${productFlavor}${buildType}'
41 | * // 'devDisabledIn${buildType}'
42 | *
43 | * // the root of your project, i.e. where "package.json" lives
44 | * root: "../../",
45 | *
46 | * // where to put the JS bundle asset in debug mode
47 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
48 | *
49 | * // where to put the JS bundle asset in release mode
50 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
51 | *
52 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
53 | * // require('./image.png')), in debug mode
54 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
55 | *
56 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
57 | * // require('./image.png')), in release mode
58 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
59 | *
60 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
61 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
62 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle
63 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
64 | * // for example, you might want to remove it from here.
65 | * inputExcludes: ["android/**", "ios/**"],
66 | *
67 | * // override which node gets called and with what additional arguments
68 | * nodeExecutableAndArgs: ["node"],
69 | *
70 | * // supply additional arguments to the packager
71 | * extraPackagerArgs: []
72 | * ]
73 | */
74 |
75 | project.ext.react = [
76 | entryFile: "index.js"
77 | ]
78 |
79 | apply from: "../../node_modules/react-native/react.gradle"
80 |
81 | /**
82 | * Set this to true to create two separate APKs instead of one:
83 | * - An APK that only works on ARM devices
84 | * - An APK that only works on x86 devices
85 | * The advantage is the size of the APK is reduced by about 4MB.
86 | * Upload all the APKs to the Play Store and people will download
87 | * the correct one based on the CPU architecture of their device.
88 | */
89 | def enableSeparateBuildPerCPUArchitecture = false
90 |
91 | /**
92 | * Run Proguard to shrink the Java bytecode in release builds.
93 | */
94 | def enableProguardInReleaseBuilds = false
95 |
96 | android {
97 | compileSdkVersion rootProject.ext.compileSdkVersion
98 | buildToolsVersion rootProject.ext.buildToolsVersion
99 |
100 | defaultConfig {
101 | applicationId "com.rectnative"
102 | minSdkVersion rootProject.ext.minSdkVersion
103 | targetSdkVersion rootProject.ext.targetSdkVersion
104 | versionCode 1
105 | versionName "1.0"
106 | ndk {
107 | abiFilters "armeabi-v7a", "x86"
108 | }
109 | }
110 | splits {
111 | abi {
112 | reset()
113 | enable enableSeparateBuildPerCPUArchitecture
114 | universalApk false // If true, also generate a universal APK
115 | include "armeabi-v7a", "x86"
116 | }
117 | }
118 | buildTypes {
119 | release {
120 | minifyEnabled enableProguardInReleaseBuilds
121 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
122 | }
123 | }
124 | // applicationVariants are e.g. debug, release
125 | applicationVariants.all { variant ->
126 | variant.outputs.each { output ->
127 | // For each separate APK per architecture, set a unique version code as described here:
128 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
129 | def versionCodes = ["armeabi-v7a":1, "x86":2]
130 | def abi = output.getFilter(OutputFile.ABI)
131 | if (abi != null) { // null for the universal-debug, universal-release variants
132 | output.versionCodeOverride =
133 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
134 | }
135 | }
136 | }
137 | }
138 |
139 | dependencies {
140 | implementation fileTree(dir: "libs", include: ["*.jar"])
141 | implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
142 | implementation "com.facebook.react:react-native:+" // From node_modules
143 | }
144 |
145 | // Run this once to be able to run the application with BUCK
146 | // puts all compile dependencies into folder libs for BUCK to use
147 | task copyDownloadableDepsToLibs(type: Copy) {
148 | from configurations.compile
149 | into 'libs'
150 | }
151 |
--------------------------------------------------------------------------------
/examples/reactnative/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/examples/reactnative/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
13 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/examples/reactnative/android/app/src/main/java/com/rectnative/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.rectnative;
2 |
3 | import com.facebook.react.ReactActivity;
4 |
5 | public class MainActivity extends ReactActivity {
6 |
7 | /**
8 | * Returns the name of the main component registered from JavaScript.
9 | * This is used to schedule rendering of the component.
10 | */
11 | @Override
12 | protected String getMainComponentName() {
13 | return "rectnative";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/examples/reactnative/android/app/src/main/java/com/rectnative/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.rectnative;
2 |
3 | import android.app.Application;
4 |
5 | import com.facebook.react.ReactApplication;
6 | import com.facebook.react.ReactNativeHost;
7 | import com.facebook.react.ReactPackage;
8 | import com.facebook.react.shell.MainReactPackage;
9 | import com.facebook.soloader.SoLoader;
10 |
11 | import java.util.Arrays;
12 | import java.util.List;
13 |
14 | public class MainApplication extends Application implements ReactApplication {
15 |
16 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
17 | @Override
18 | public boolean getUseDeveloperSupport() {
19 | return BuildConfig.DEBUG;
20 | }
21 |
22 | @Override
23 | protected List getPackages() {
24 | return Arrays.asList(
25 | new MainReactPackage()
26 | );
27 | }
28 |
29 | @Override
30 | protected String getJSMainModuleName() {
31 | return "index";
32 | }
33 | };
34 |
35 | @Override
36 | public ReactNativeHost getReactNativeHost() {
37 | return mReactNativeHost;
38 | }
39 |
40 | @Override
41 | public void onCreate() {
42 | super.onCreate();
43 | SoLoader.init(this, /* native exopackage */ false);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/examples/reactnative/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigooler/i18nh/48c0036bc54a770cb588e7812f8d72339930bd01/examples/reactnative/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/reactnative/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigooler/i18nh/48c0036bc54a770cb588e7812f8d72339930bd01/examples/reactnative/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/reactnative/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigooler/i18nh/48c0036bc54a770cb588e7812f8d72339930bd01/examples/reactnative/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/reactnative/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigooler/i18nh/48c0036bc54a770cb588e7812f8d72339930bd01/examples/reactnative/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/reactnative/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigooler/i18nh/48c0036bc54a770cb588e7812f8d72339930bd01/examples/reactnative/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/reactnative/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigooler/i18nh/48c0036bc54a770cb588e7812f8d72339930bd01/examples/reactnative/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/reactnative/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigooler/i18nh/48c0036bc54a770cb588e7812f8d72339930bd01/examples/reactnative/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/reactnative/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigooler/i18nh/48c0036bc54a770cb588e7812f8d72339930bd01/examples/reactnative/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/reactnative/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigooler/i18nh/48c0036bc54a770cb588e7812f8d72339930bd01/examples/reactnative/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/reactnative/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigooler/i18nh/48c0036bc54a770cb588e7812f8d72339930bd01/examples/reactnative/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/reactnative/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | rectnative
3 |
4 |
--------------------------------------------------------------------------------
/examples/reactnative/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/reactnative/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext {
5 | buildToolsVersion = "27.0.3"
6 | minSdkVersion = 16
7 | compileSdkVersion = 27
8 | targetSdkVersion = 26
9 | supportLibVersion = "27.1.1"
10 | }
11 | repositories {
12 | google()
13 | jcenter()
14 | }
15 | dependencies {
16 | classpath 'com.android.tools.build:gradle:3.1.4'
17 |
18 | // NOTE: Do not place your application dependencies here; they belong
19 | // in the individual module build.gradle files
20 | }
21 | }
22 |
23 | allprojects {
24 | repositories {
25 | google()
26 | mavenLocal()
27 | jcenter()
28 | maven {
29 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
30 | url "$rootDir/../node_modules/react-native/android"
31 | }
32 | }
33 | }
34 |
35 |
36 | task wrapper(type: Wrapper) {
37 | gradleVersion = '4.4'
38 | distributionUrl = distributionUrl.replace("bin", "all")
39 | }
40 |
--------------------------------------------------------------------------------
/examples/reactnative/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
--------------------------------------------------------------------------------
/examples/reactnative/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigooler/i18nh/48c0036bc54a770cb588e7812f8d72339930bd01/examples/reactnative/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/examples/reactnative/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
6 |
--------------------------------------------------------------------------------
/examples/reactnative/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/examples/reactnative/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/examples/reactnative/android/keystores/BUCK:
--------------------------------------------------------------------------------
1 | keystore(
2 | name = "debug",
3 | properties = "debug.keystore.properties",
4 | store = "debug.keystore",
5 | visibility = [
6 | "PUBLIC",
7 | ],
8 | )
9 |
--------------------------------------------------------------------------------
/examples/reactnative/android/keystores/debug.keystore.properties:
--------------------------------------------------------------------------------
1 | key.store=debug.keystore
2 | key.alias=androiddebugkey
3 | key.store.password=android
4 | key.alias.password=android
5 |
--------------------------------------------------------------------------------
/examples/reactnative/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'rectnative'
2 |
3 | include ':app'
4 |
--------------------------------------------------------------------------------
/examples/reactnative/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "rectnative",
3 | "displayName": "rectnative"
4 | }
--------------------------------------------------------------------------------
/examples/reactnative/index.js:
--------------------------------------------------------------------------------
1 | /** @format */
2 |
3 | import {AppRegistry} from 'react-native';
4 | import App from './App';
5 | import {name as appName} from './app.json';
6 |
7 | AppRegistry.registerComponent(appName, () => App);
8 |
--------------------------------------------------------------------------------
/examples/reactnative/ios/rectnative-tvOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UIViewControllerBasedStatusBarAppearance
38 |
39 | NSLocationWhenInUseUsageDescription
40 |
41 | NSAppTransportSecurity
42 |
43 |
44 | NSExceptionDomains
45 |
46 | localhost
47 |
48 | NSExceptionAllowsInsecureHTTPLoads
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/examples/reactnative/ios/rectnative-tvOSTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/reactnative/ios/rectnative.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
11 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };
12 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; };
13 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; };
14 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; };
15 | 00E356F31AD99517003FC87E /* rectnativeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* rectnativeTests.m */; };
16 | 11D1A2F320CAFA9E000508D9 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
17 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; };
18 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; };
19 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; };
20 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
21 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
22 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
23 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
24 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
25 | 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
26 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
27 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
28 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
29 | 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
30 | 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */; };
31 | 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */; };
32 | 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */; };
33 | 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */; };
34 | 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */; };
35 | 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */; };
36 | 2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D16E6891FA4F8E400B85C8A /* libReact.a */; };
37 | 2DCD954D1E0B4F2C00145EB5 /* rectnativeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* rectnativeTests.m */; };
38 | 2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; };
39 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
40 | ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; };
41 | /* End PBXBuildFile section */
42 |
43 | /* Begin PBXContainerItemProxy section */
44 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = {
45 | isa = PBXContainerItemProxy;
46 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
47 | proxyType = 2;
48 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
49 | remoteInfo = RCTActionSheet;
50 | };
51 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = {
52 | isa = PBXContainerItemProxy;
53 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
54 | proxyType = 2;
55 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
56 | remoteInfo = RCTGeolocation;
57 | };
58 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = {
59 | isa = PBXContainerItemProxy;
60 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
61 | proxyType = 2;
62 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676;
63 | remoteInfo = RCTImage;
64 | };
65 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = {
66 | isa = PBXContainerItemProxy;
67 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
68 | proxyType = 2;
69 | remoteGlobalIDString = 58B511DB1A9E6C8500147676;
70 | remoteInfo = RCTNetwork;
71 | };
72 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = {
73 | isa = PBXContainerItemProxy;
74 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
75 | proxyType = 2;
76 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7;
77 | remoteInfo = RCTVibration;
78 | };
79 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = {
80 | isa = PBXContainerItemProxy;
81 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
82 | proxyType = 1;
83 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
84 | remoteInfo = rectnative;
85 | };
86 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = {
87 | isa = PBXContainerItemProxy;
88 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
89 | proxyType = 2;
90 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
91 | remoteInfo = RCTSettings;
92 | };
93 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = {
94 | isa = PBXContainerItemProxy;
95 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
96 | proxyType = 2;
97 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A;
98 | remoteInfo = RCTWebSocket;
99 | };
100 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = {
101 | isa = PBXContainerItemProxy;
102 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
103 | proxyType = 2;
104 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192;
105 | remoteInfo = React;
106 | };
107 | 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = {
108 | isa = PBXContainerItemProxy;
109 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
110 | proxyType = 1;
111 | remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7;
112 | remoteInfo = "rectnative-tvOS";
113 | };
114 | 2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */ = {
115 | isa = PBXContainerItemProxy;
116 | containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
117 | proxyType = 2;
118 | remoteGlobalIDString = ADD01A681E09402E00F6D226;
119 | remoteInfo = "RCTBlob-tvOS";
120 | };
121 | 2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */ = {
122 | isa = PBXContainerItemProxy;
123 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
124 | proxyType = 2;
125 | remoteGlobalIDString = 3DBE0D001F3B181A0099AA32;
126 | remoteInfo = fishhook;
127 | };
128 | 2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */ = {
129 | isa = PBXContainerItemProxy;
130 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
131 | proxyType = 2;
132 | remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32;
133 | remoteInfo = "fishhook-tvOS";
134 | };
135 | 2DF0FFDE2056DD460020B375 /* PBXContainerItemProxy */ = {
136 | isa = PBXContainerItemProxy;
137 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
138 | proxyType = 2;
139 | remoteGlobalIDString = EBF21BDC1FC498900052F4D5;
140 | remoteInfo = jsinspector;
141 | };
142 | 2DF0FFE02056DD460020B375 /* PBXContainerItemProxy */ = {
143 | isa = PBXContainerItemProxy;
144 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
145 | proxyType = 2;
146 | remoteGlobalIDString = EBF21BFA1FC4989A0052F4D5;
147 | remoteInfo = "jsinspector-tvOS";
148 | };
149 | 2DF0FFE22056DD460020B375 /* PBXContainerItemProxy */ = {
150 | isa = PBXContainerItemProxy;
151 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
152 | proxyType = 2;
153 | remoteGlobalIDString = 139D7ECE1E25DB7D00323FB7;
154 | remoteInfo = "third-party";
155 | };
156 | 2DF0FFE42056DD460020B375 /* PBXContainerItemProxy */ = {
157 | isa = PBXContainerItemProxy;
158 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
159 | proxyType = 2;
160 | remoteGlobalIDString = 3D383D3C1EBD27B6005632C8;
161 | remoteInfo = "third-party-tvOS";
162 | };
163 | 2DF0FFE62056DD460020B375 /* PBXContainerItemProxy */ = {
164 | isa = PBXContainerItemProxy;
165 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
166 | proxyType = 2;
167 | remoteGlobalIDString = 139D7E881E25C6D100323FB7;
168 | remoteInfo = "double-conversion";
169 | };
170 | 2DF0FFE82056DD460020B375 /* PBXContainerItemProxy */ = {
171 | isa = PBXContainerItemProxy;
172 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
173 | proxyType = 2;
174 | remoteGlobalIDString = 3D383D621EBD27B9005632C8;
175 | remoteInfo = "double-conversion-tvOS";
176 | };
177 | 2DF0FFEA2056DD460020B375 /* PBXContainerItemProxy */ = {
178 | isa = PBXContainerItemProxy;
179 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
180 | proxyType = 2;
181 | remoteGlobalIDString = 9936F3131F5F2E4B0010BF04;
182 | remoteInfo = privatedata;
183 | };
184 | 2DF0FFEC2056DD460020B375 /* PBXContainerItemProxy */ = {
185 | isa = PBXContainerItemProxy;
186 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
187 | proxyType = 2;
188 | remoteGlobalIDString = 9936F32F1F5F2E5B0010BF04;
189 | remoteInfo = "privatedata-tvOS";
190 | };
191 | 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = {
192 | isa = PBXContainerItemProxy;
193 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
194 | proxyType = 2;
195 | remoteGlobalIDString = 2D2A283A1D9B042B00D4039D;
196 | remoteInfo = "RCTImage-tvOS";
197 | };
198 | 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */ = {
199 | isa = PBXContainerItemProxy;
200 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
201 | proxyType = 2;
202 | remoteGlobalIDString = 2D2A28471D9B043800D4039D;
203 | remoteInfo = "RCTLinking-tvOS";
204 | };
205 | 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
206 | isa = PBXContainerItemProxy;
207 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
208 | proxyType = 2;
209 | remoteGlobalIDString = 2D2A28541D9B044C00D4039D;
210 | remoteInfo = "RCTNetwork-tvOS";
211 | };
212 | 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
213 | isa = PBXContainerItemProxy;
214 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
215 | proxyType = 2;
216 | remoteGlobalIDString = 2D2A28611D9B046600D4039D;
217 | remoteInfo = "RCTSettings-tvOS";
218 | };
219 | 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */ = {
220 | isa = PBXContainerItemProxy;
221 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
222 | proxyType = 2;
223 | remoteGlobalIDString = 2D2A287B1D9B048500D4039D;
224 | remoteInfo = "RCTText-tvOS";
225 | };
226 | 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */ = {
227 | isa = PBXContainerItemProxy;
228 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
229 | proxyType = 2;
230 | remoteGlobalIDString = 2D2A28881D9B049200D4039D;
231 | remoteInfo = "RCTWebSocket-tvOS";
232 | };
233 | 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */ = {
234 | isa = PBXContainerItemProxy;
235 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
236 | proxyType = 2;
237 | remoteGlobalIDString = 2D2A28131D9B038B00D4039D;
238 | remoteInfo = "React-tvOS";
239 | };
240 | 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */ = {
241 | isa = PBXContainerItemProxy;
242 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
243 | proxyType = 2;
244 | remoteGlobalIDString = 3D3C059A1DE3340900C268FA;
245 | remoteInfo = yoga;
246 | };
247 | 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */ = {
248 | isa = PBXContainerItemProxy;
249 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
250 | proxyType = 2;
251 | remoteGlobalIDString = 3D3C06751DE3340C00C268FA;
252 | remoteInfo = "yoga-tvOS";
253 | };
254 | 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */ = {
255 | isa = PBXContainerItemProxy;
256 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
257 | proxyType = 2;
258 | remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4;
259 | remoteInfo = cxxreact;
260 | };
261 | 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
262 | isa = PBXContainerItemProxy;
263 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
264 | proxyType = 2;
265 | remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4;
266 | remoteInfo = "cxxreact-tvOS";
267 | };
268 | 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
269 | isa = PBXContainerItemProxy;
270 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
271 | proxyType = 2;
272 | remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4;
273 | remoteInfo = jschelpers;
274 | };
275 | 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
276 | isa = PBXContainerItemProxy;
277 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
278 | proxyType = 2;
279 | remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4;
280 | remoteInfo = "jschelpers-tvOS";
281 | };
282 | 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = {
283 | isa = PBXContainerItemProxy;
284 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
285 | proxyType = 2;
286 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
287 | remoteInfo = RCTAnimation;
288 | };
289 | 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = {
290 | isa = PBXContainerItemProxy;
291 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
292 | proxyType = 2;
293 | remoteGlobalIDString = 2D2A28201D9B03D100D4039D;
294 | remoteInfo = "RCTAnimation-tvOS";
295 | };
296 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = {
297 | isa = PBXContainerItemProxy;
298 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
299 | proxyType = 2;
300 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
301 | remoteInfo = RCTLinking;
302 | };
303 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = {
304 | isa = PBXContainerItemProxy;
305 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
306 | proxyType = 2;
307 | remoteGlobalIDString = 58B5119B1A9E6C1200147676;
308 | remoteInfo = RCTText;
309 | };
310 | ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */ = {
311 | isa = PBXContainerItemProxy;
312 | containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
313 | proxyType = 2;
314 | remoteGlobalIDString = 358F4ED71D1E81A9004DF814;
315 | remoteInfo = RCTBlob;
316 | };
317 | /* End PBXContainerItemProxy section */
318 |
319 | /* Begin PBXFileReference section */
320 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; };
321 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; };
322 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; };
323 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; };
324 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; };
325 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; };
326 | 00E356EE1AD99517003FC87E /* rectnativeTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = rectnativeTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
327 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
328 | 00E356F21AD99517003FC87E /* rectnativeTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = rectnativeTests.m; sourceTree = ""; };
329 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; };
330 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; };
331 | 13B07F961A680F5B00A75B9A /* rectnative.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = rectnative.app; sourceTree = BUILT_PRODUCTS_DIR; };
332 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = rectnative/AppDelegate.h; sourceTree = ""; };
333 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = rectnative/AppDelegate.m; sourceTree = ""; };
334 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
335 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = rectnative/Images.xcassets; sourceTree = ""; };
336 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = rectnative/Info.plist; sourceTree = ""; };
337 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = rectnative/main.m; sourceTree = ""; };
338 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; };
339 | 2D02E47B1E0B4A5D006451C7 /* rectnative-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "rectnative-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
340 | 2D02E4901E0B4A5D006451C7 /* rectnative-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "rectnative-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
341 | 2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; };
342 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; };
343 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; };
344 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; };
345 | ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = ""; };
346 | /* End PBXFileReference section */
347 |
348 | /* Begin PBXFrameworksBuildPhase section */
349 | 00E356EB1AD99517003FC87E /* Frameworks */ = {
350 | isa = PBXFrameworksBuildPhase;
351 | buildActionMask = 2147483647;
352 | files = (
353 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */,
354 | );
355 | runOnlyForDeploymentPostprocessing = 0;
356 | };
357 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
358 | isa = PBXFrameworksBuildPhase;
359 | buildActionMask = 2147483647;
360 | files = (
361 | ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */,
362 | 11D1A2F320CAFA9E000508D9 /* libRCTAnimation.a in Frameworks */,
363 | 146834051AC3E58100842450 /* libReact.a in Frameworks */,
364 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
365 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
366 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */,
367 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */,
368 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */,
369 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */,
370 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
371 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
372 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
373 | );
374 | runOnlyForDeploymentPostprocessing = 0;
375 | };
376 | 2D02E4781E0B4A5D006451C7 /* Frameworks */ = {
377 | isa = PBXFrameworksBuildPhase;
378 | buildActionMask = 2147483647;
379 | files = (
380 | 2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */,
381 | 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */,
382 | 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */,
383 | 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */,
384 | 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */,
385 | 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */,
386 | 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */,
387 | 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */,
388 | );
389 | runOnlyForDeploymentPostprocessing = 0;
390 | };
391 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = {
392 | isa = PBXFrameworksBuildPhase;
393 | buildActionMask = 2147483647;
394 | files = (
395 | 2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */,
396 | );
397 | runOnlyForDeploymentPostprocessing = 0;
398 | };
399 | /* End PBXFrameworksBuildPhase section */
400 |
401 | /* Begin PBXGroup section */
402 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = {
403 | isa = PBXGroup;
404 | children = (
405 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */,
406 | );
407 | name = Products;
408 | sourceTree = "";
409 | };
410 | 00C302B61ABCB90400DB3ED1 /* Products */ = {
411 | isa = PBXGroup;
412 | children = (
413 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */,
414 | );
415 | name = Products;
416 | sourceTree = "";
417 | };
418 | 00C302BC1ABCB91800DB3ED1 /* Products */ = {
419 | isa = PBXGroup;
420 | children = (
421 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */,
422 | 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */,
423 | );
424 | name = Products;
425 | sourceTree = "";
426 | };
427 | 00C302D41ABCB9D200DB3ED1 /* Products */ = {
428 | isa = PBXGroup;
429 | children = (
430 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */,
431 | 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */,
432 | );
433 | name = Products;
434 | sourceTree = "";
435 | };
436 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = {
437 | isa = PBXGroup;
438 | children = (
439 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */,
440 | );
441 | name = Products;
442 | sourceTree = "";
443 | };
444 | 00E356EF1AD99517003FC87E /* rectnativeTests */ = {
445 | isa = PBXGroup;
446 | children = (
447 | 00E356F21AD99517003FC87E /* rectnativeTests.m */,
448 | 00E356F01AD99517003FC87E /* Supporting Files */,
449 | );
450 | path = rectnativeTests;
451 | sourceTree = "";
452 | };
453 | 00E356F01AD99517003FC87E /* Supporting Files */ = {
454 | isa = PBXGroup;
455 | children = (
456 | 00E356F11AD99517003FC87E /* Info.plist */,
457 | );
458 | name = "Supporting Files";
459 | sourceTree = "";
460 | };
461 | 139105B71AF99BAD00B5F7CC /* Products */ = {
462 | isa = PBXGroup;
463 | children = (
464 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */,
465 | 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */,
466 | );
467 | name = Products;
468 | sourceTree = "";
469 | };
470 | 139FDEE71B06529A00C62182 /* Products */ = {
471 | isa = PBXGroup;
472 | children = (
473 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
474 | 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */,
475 | 2D16E6841FA4F8DC00B85C8A /* libfishhook.a */,
476 | 2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */,
477 | );
478 | name = Products;
479 | sourceTree = "";
480 | };
481 | 13B07FAE1A68108700A75B9A /* rectnative */ = {
482 | isa = PBXGroup;
483 | children = (
484 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */,
485 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
486 | 13B07FB01A68108700A75B9A /* AppDelegate.m */,
487 | 13B07FB51A68108700A75B9A /* Images.xcassets */,
488 | 13B07FB61A68108700A75B9A /* Info.plist */,
489 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
490 | 13B07FB71A68108700A75B9A /* main.m */,
491 | );
492 | name = rectnative;
493 | sourceTree = "";
494 | };
495 | 146834001AC3E56700842450 /* Products */ = {
496 | isa = PBXGroup;
497 | children = (
498 | 146834041AC3E56700842450 /* libReact.a */,
499 | 3DAD3EA31DF850E9000B6D8A /* libReact.a */,
500 | 3DAD3EA51DF850E9000B6D8A /* libyoga.a */,
501 | 3DAD3EA71DF850E9000B6D8A /* libyoga.a */,
502 | 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */,
503 | 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */,
504 | 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */,
505 | 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */,
506 | 2DF0FFDF2056DD460020B375 /* libjsinspector.a */,
507 | 2DF0FFE12056DD460020B375 /* libjsinspector-tvOS.a */,
508 | 2DF0FFE32056DD460020B375 /* libthird-party.a */,
509 | 2DF0FFE52056DD460020B375 /* libthird-party.a */,
510 | 2DF0FFE72056DD460020B375 /* libdouble-conversion.a */,
511 | 2DF0FFE92056DD460020B375 /* libdouble-conversion.a */,
512 | 2DF0FFEB2056DD460020B375 /* libprivatedata.a */,
513 | 2DF0FFED2056DD460020B375 /* libprivatedata-tvOS.a */,
514 | );
515 | name = Products;
516 | sourceTree = "";
517 | };
518 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
519 | isa = PBXGroup;
520 | children = (
521 | 2D16E6891FA4F8E400B85C8A /* libReact.a */,
522 | );
523 | name = Frameworks;
524 | sourceTree = "";
525 | };
526 | 5E91572E1DD0AC6500FF2AA8 /* Products */ = {
527 | isa = PBXGroup;
528 | children = (
529 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */,
530 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */,
531 | );
532 | name = Products;
533 | sourceTree = "";
534 | };
535 | 78C398B11ACF4ADC00677621 /* Products */ = {
536 | isa = PBXGroup;
537 | children = (
538 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */,
539 | 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */,
540 | );
541 | name = Products;
542 | sourceTree = "";
543 | };
544 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
545 | isa = PBXGroup;
546 | children = (
547 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */,
548 | 146833FF1AC3E56700842450 /* React.xcodeproj */,
549 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
550 | ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */,
551 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */,
552 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */,
553 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */,
554 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */,
555 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */,
556 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
557 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
558 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
559 | );
560 | name = Libraries;
561 | sourceTree = "";
562 | };
563 | 832341B11AAA6A8300B99B32 /* Products */ = {
564 | isa = PBXGroup;
565 | children = (
566 | 832341B51AAA6A8300B99B32 /* libRCTText.a */,
567 | 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */,
568 | );
569 | name = Products;
570 | sourceTree = "";
571 | };
572 | 83CBB9F61A601CBA00E9B192 = {
573 | isa = PBXGroup;
574 | children = (
575 | 13B07FAE1A68108700A75B9A /* rectnative */,
576 | 832341AE1AAA6A7D00B99B32 /* Libraries */,
577 | 00E356EF1AD99517003FC87E /* rectnativeTests */,
578 | 83CBBA001A601CBA00E9B192 /* Products */,
579 | 2D16E6871FA4F8E400B85C8A /* Frameworks */,
580 | );
581 | indentWidth = 2;
582 | sourceTree = "";
583 | tabWidth = 2;
584 | usesTabs = 0;
585 | };
586 | 83CBBA001A601CBA00E9B192 /* Products */ = {
587 | isa = PBXGroup;
588 | children = (
589 | 13B07F961A680F5B00A75B9A /* rectnative.app */,
590 | 00E356EE1AD99517003FC87E /* rectnativeTests.xctest */,
591 | 2D02E47B1E0B4A5D006451C7 /* rectnative-tvOS.app */,
592 | 2D02E4901E0B4A5D006451C7 /* rectnative-tvOSTests.xctest */,
593 | );
594 | name = Products;
595 | sourceTree = "";
596 | };
597 | ADBDB9201DFEBF0600ED6528 /* Products */ = {
598 | isa = PBXGroup;
599 | children = (
600 | ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */,
601 | 2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */,
602 | );
603 | name = Products;
604 | sourceTree = "";
605 | };
606 | /* End PBXGroup section */
607 |
608 | /* Begin PBXNativeTarget section */
609 | 00E356ED1AD99517003FC87E /* rectnativeTests */ = {
610 | isa = PBXNativeTarget;
611 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "rectnativeTests" */;
612 | buildPhases = (
613 | 00E356EA1AD99517003FC87E /* Sources */,
614 | 00E356EB1AD99517003FC87E /* Frameworks */,
615 | 00E356EC1AD99517003FC87E /* Resources */,
616 | );
617 | buildRules = (
618 | );
619 | dependencies = (
620 | 00E356F51AD99517003FC87E /* PBXTargetDependency */,
621 | );
622 | name = rectnativeTests;
623 | productName = rectnativeTests;
624 | productReference = 00E356EE1AD99517003FC87E /* rectnativeTests.xctest */;
625 | productType = "com.apple.product-type.bundle.unit-test";
626 | };
627 | 13B07F861A680F5B00A75B9A /* rectnative */ = {
628 | isa = PBXNativeTarget;
629 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "rectnative" */;
630 | buildPhases = (
631 | 13B07F871A680F5B00A75B9A /* Sources */,
632 | 13B07F8C1A680F5B00A75B9A /* Frameworks */,
633 | 13B07F8E1A680F5B00A75B9A /* Resources */,
634 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
635 | );
636 | buildRules = (
637 | );
638 | dependencies = (
639 | );
640 | name = rectnative;
641 | productName = "Hello World";
642 | productReference = 13B07F961A680F5B00A75B9A /* rectnative.app */;
643 | productType = "com.apple.product-type.application";
644 | };
645 | 2D02E47A1E0B4A5D006451C7 /* rectnative-tvOS */ = {
646 | isa = PBXNativeTarget;
647 | buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "rectnative-tvOS" */;
648 | buildPhases = (
649 | 2D02E4771E0B4A5D006451C7 /* Sources */,
650 | 2D02E4781E0B4A5D006451C7 /* Frameworks */,
651 | 2D02E4791E0B4A5D006451C7 /* Resources */,
652 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */,
653 | );
654 | buildRules = (
655 | );
656 | dependencies = (
657 | );
658 | name = "rectnative-tvOS";
659 | productName = "rectnative-tvOS";
660 | productReference = 2D02E47B1E0B4A5D006451C7 /* rectnative-tvOS.app */;
661 | productType = "com.apple.product-type.application";
662 | };
663 | 2D02E48F1E0B4A5D006451C7 /* rectnative-tvOSTests */ = {
664 | isa = PBXNativeTarget;
665 | buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "rectnative-tvOSTests" */;
666 | buildPhases = (
667 | 2D02E48C1E0B4A5D006451C7 /* Sources */,
668 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */,
669 | 2D02E48E1E0B4A5D006451C7 /* Resources */,
670 | );
671 | buildRules = (
672 | );
673 | dependencies = (
674 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */,
675 | );
676 | name = "rectnative-tvOSTests";
677 | productName = "rectnative-tvOSTests";
678 | productReference = 2D02E4901E0B4A5D006451C7 /* rectnative-tvOSTests.xctest */;
679 | productType = "com.apple.product-type.bundle.unit-test";
680 | };
681 | /* End PBXNativeTarget section */
682 |
683 | /* Begin PBXProject section */
684 | 83CBB9F71A601CBA00E9B192 /* Project object */ = {
685 | isa = PBXProject;
686 | attributes = {
687 | LastUpgradeCheck = 0940;
688 | ORGANIZATIONNAME = Facebook;
689 | TargetAttributes = {
690 | 00E356ED1AD99517003FC87E = {
691 | CreatedOnToolsVersion = 6.2;
692 | TestTargetID = 13B07F861A680F5B00A75B9A;
693 | };
694 | 2D02E47A1E0B4A5D006451C7 = {
695 | CreatedOnToolsVersion = 8.2.1;
696 | ProvisioningStyle = Automatic;
697 | };
698 | 2D02E48F1E0B4A5D006451C7 = {
699 | CreatedOnToolsVersion = 8.2.1;
700 | ProvisioningStyle = Automatic;
701 | TestTargetID = 2D02E47A1E0B4A5D006451C7;
702 | };
703 | };
704 | };
705 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "rectnative" */;
706 | compatibilityVersion = "Xcode 3.2";
707 | developmentRegion = English;
708 | hasScannedForEncodings = 0;
709 | knownRegions = (
710 | en,
711 | Base,
712 | );
713 | mainGroup = 83CBB9F61A601CBA00E9B192;
714 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
715 | projectDirPath = "";
716 | projectReferences = (
717 | {
718 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */;
719 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
720 | },
721 | {
722 | ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */;
723 | ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
724 | },
725 | {
726 | ProductGroup = ADBDB9201DFEBF0600ED6528 /* Products */;
727 | ProjectRef = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
728 | },
729 | {
730 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */;
731 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
732 | },
733 | {
734 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */;
735 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
736 | },
737 | {
738 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */;
739 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
740 | },
741 | {
742 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */;
743 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
744 | },
745 | {
746 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */;
747 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
748 | },
749 | {
750 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */;
751 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
752 | },
753 | {
754 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */;
755 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
756 | },
757 | {
758 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */;
759 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
760 | },
761 | {
762 | ProductGroup = 146834001AC3E56700842450 /* Products */;
763 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
764 | },
765 | );
766 | projectRoot = "";
767 | targets = (
768 | 13B07F861A680F5B00A75B9A /* rectnative */,
769 | 00E356ED1AD99517003FC87E /* rectnativeTests */,
770 | 2D02E47A1E0B4A5D006451C7 /* rectnative-tvOS */,
771 | 2D02E48F1E0B4A5D006451C7 /* rectnative-tvOSTests */,
772 | );
773 | };
774 | /* End PBXProject section */
775 |
776 | /* Begin PBXReferenceProxy section */
777 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = {
778 | isa = PBXReferenceProxy;
779 | fileType = archive.ar;
780 | path = libRCTActionSheet.a;
781 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */;
782 | sourceTree = BUILT_PRODUCTS_DIR;
783 | };
784 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = {
785 | isa = PBXReferenceProxy;
786 | fileType = archive.ar;
787 | path = libRCTGeolocation.a;
788 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */;
789 | sourceTree = BUILT_PRODUCTS_DIR;
790 | };
791 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = {
792 | isa = PBXReferenceProxy;
793 | fileType = archive.ar;
794 | path = libRCTImage.a;
795 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */;
796 | sourceTree = BUILT_PRODUCTS_DIR;
797 | };
798 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = {
799 | isa = PBXReferenceProxy;
800 | fileType = archive.ar;
801 | path = libRCTNetwork.a;
802 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */;
803 | sourceTree = BUILT_PRODUCTS_DIR;
804 | };
805 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = {
806 | isa = PBXReferenceProxy;
807 | fileType = archive.ar;
808 | path = libRCTVibration.a;
809 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */;
810 | sourceTree = BUILT_PRODUCTS_DIR;
811 | };
812 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = {
813 | isa = PBXReferenceProxy;
814 | fileType = archive.ar;
815 | path = libRCTSettings.a;
816 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */;
817 | sourceTree = BUILT_PRODUCTS_DIR;
818 | };
819 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = {
820 | isa = PBXReferenceProxy;
821 | fileType = archive.ar;
822 | path = libRCTWebSocket.a;
823 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */;
824 | sourceTree = BUILT_PRODUCTS_DIR;
825 | };
826 | 146834041AC3E56700842450 /* libReact.a */ = {
827 | isa = PBXReferenceProxy;
828 | fileType = archive.ar;
829 | path = libReact.a;
830 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */;
831 | sourceTree = BUILT_PRODUCTS_DIR;
832 | };
833 | 2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */ = {
834 | isa = PBXReferenceProxy;
835 | fileType = archive.ar;
836 | path = "libRCTBlob-tvOS.a";
837 | remoteRef = 2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */;
838 | sourceTree = BUILT_PRODUCTS_DIR;
839 | };
840 | 2D16E6841FA4F8DC00B85C8A /* libfishhook.a */ = {
841 | isa = PBXReferenceProxy;
842 | fileType = archive.ar;
843 | path = libfishhook.a;
844 | remoteRef = 2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */;
845 | sourceTree = BUILT_PRODUCTS_DIR;
846 | };
847 | 2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */ = {
848 | isa = PBXReferenceProxy;
849 | fileType = archive.ar;
850 | path = "libfishhook-tvOS.a";
851 | remoteRef = 2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */;
852 | sourceTree = BUILT_PRODUCTS_DIR;
853 | };
854 | 2DF0FFDF2056DD460020B375 /* libjsinspector.a */ = {
855 | isa = PBXReferenceProxy;
856 | fileType = archive.ar;
857 | path = libjsinspector.a;
858 | remoteRef = 2DF0FFDE2056DD460020B375 /* PBXContainerItemProxy */;
859 | sourceTree = BUILT_PRODUCTS_DIR;
860 | };
861 | 2DF0FFE12056DD460020B375 /* libjsinspector-tvOS.a */ = {
862 | isa = PBXReferenceProxy;
863 | fileType = archive.ar;
864 | path = "libjsinspector-tvOS.a";
865 | remoteRef = 2DF0FFE02056DD460020B375 /* PBXContainerItemProxy */;
866 | sourceTree = BUILT_PRODUCTS_DIR;
867 | };
868 | 2DF0FFE32056DD460020B375 /* libthird-party.a */ = {
869 | isa = PBXReferenceProxy;
870 | fileType = archive.ar;
871 | path = "libthird-party.a";
872 | remoteRef = 2DF0FFE22056DD460020B375 /* PBXContainerItemProxy */;
873 | sourceTree = BUILT_PRODUCTS_DIR;
874 | };
875 | 2DF0FFE52056DD460020B375 /* libthird-party.a */ = {
876 | isa = PBXReferenceProxy;
877 | fileType = archive.ar;
878 | path = "libthird-party.a";
879 | remoteRef = 2DF0FFE42056DD460020B375 /* PBXContainerItemProxy */;
880 | sourceTree = BUILT_PRODUCTS_DIR;
881 | };
882 | 2DF0FFE72056DD460020B375 /* libdouble-conversion.a */ = {
883 | isa = PBXReferenceProxy;
884 | fileType = archive.ar;
885 | path = "libdouble-conversion.a";
886 | remoteRef = 2DF0FFE62056DD460020B375 /* PBXContainerItemProxy */;
887 | sourceTree = BUILT_PRODUCTS_DIR;
888 | };
889 | 2DF0FFE92056DD460020B375 /* libdouble-conversion.a */ = {
890 | isa = PBXReferenceProxy;
891 | fileType = archive.ar;
892 | path = "libdouble-conversion.a";
893 | remoteRef = 2DF0FFE82056DD460020B375 /* PBXContainerItemProxy */;
894 | sourceTree = BUILT_PRODUCTS_DIR;
895 | };
896 | 2DF0FFEB2056DD460020B375 /* libprivatedata.a */ = {
897 | isa = PBXReferenceProxy;
898 | fileType = archive.ar;
899 | path = libprivatedata.a;
900 | remoteRef = 2DF0FFEA2056DD460020B375 /* PBXContainerItemProxy */;
901 | sourceTree = BUILT_PRODUCTS_DIR;
902 | };
903 | 2DF0FFED2056DD460020B375 /* libprivatedata-tvOS.a */ = {
904 | isa = PBXReferenceProxy;
905 | fileType = archive.ar;
906 | path = "libprivatedata-tvOS.a";
907 | remoteRef = 2DF0FFEC2056DD460020B375 /* PBXContainerItemProxy */;
908 | sourceTree = BUILT_PRODUCTS_DIR;
909 | };
910 | 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = {
911 | isa = PBXReferenceProxy;
912 | fileType = archive.ar;
913 | path = "libRCTImage-tvOS.a";
914 | remoteRef = 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */;
915 | sourceTree = BUILT_PRODUCTS_DIR;
916 | };
917 | 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */ = {
918 | isa = PBXReferenceProxy;
919 | fileType = archive.ar;
920 | path = "libRCTLinking-tvOS.a";
921 | remoteRef = 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */;
922 | sourceTree = BUILT_PRODUCTS_DIR;
923 | };
924 | 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */ = {
925 | isa = PBXReferenceProxy;
926 | fileType = archive.ar;
927 | path = "libRCTNetwork-tvOS.a";
928 | remoteRef = 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */;
929 | sourceTree = BUILT_PRODUCTS_DIR;
930 | };
931 | 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */ = {
932 | isa = PBXReferenceProxy;
933 | fileType = archive.ar;
934 | path = "libRCTSettings-tvOS.a";
935 | remoteRef = 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */;
936 | sourceTree = BUILT_PRODUCTS_DIR;
937 | };
938 | 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */ = {
939 | isa = PBXReferenceProxy;
940 | fileType = archive.ar;
941 | path = "libRCTText-tvOS.a";
942 | remoteRef = 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */;
943 | sourceTree = BUILT_PRODUCTS_DIR;
944 | };
945 | 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */ = {
946 | isa = PBXReferenceProxy;
947 | fileType = archive.ar;
948 | path = "libRCTWebSocket-tvOS.a";
949 | remoteRef = 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */;
950 | sourceTree = BUILT_PRODUCTS_DIR;
951 | };
952 | 3DAD3EA31DF850E9000B6D8A /* libReact.a */ = {
953 | isa = PBXReferenceProxy;
954 | fileType = archive.ar;
955 | path = libReact.a;
956 | remoteRef = 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */;
957 | sourceTree = BUILT_PRODUCTS_DIR;
958 | };
959 | 3DAD3EA51DF850E9000B6D8A /* libyoga.a */ = {
960 | isa = PBXReferenceProxy;
961 | fileType = archive.ar;
962 | path = libyoga.a;
963 | remoteRef = 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */;
964 | sourceTree = BUILT_PRODUCTS_DIR;
965 | };
966 | 3DAD3EA71DF850E9000B6D8A /* libyoga.a */ = {
967 | isa = PBXReferenceProxy;
968 | fileType = archive.ar;
969 | path = libyoga.a;
970 | remoteRef = 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */;
971 | sourceTree = BUILT_PRODUCTS_DIR;
972 | };
973 | 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */ = {
974 | isa = PBXReferenceProxy;
975 | fileType = archive.ar;
976 | path = libcxxreact.a;
977 | remoteRef = 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */;
978 | sourceTree = BUILT_PRODUCTS_DIR;
979 | };
980 | 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */ = {
981 | isa = PBXReferenceProxy;
982 | fileType = archive.ar;
983 | path = libcxxreact.a;
984 | remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */;
985 | sourceTree = BUILT_PRODUCTS_DIR;
986 | };
987 | 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */ = {
988 | isa = PBXReferenceProxy;
989 | fileType = archive.ar;
990 | path = libjschelpers.a;
991 | remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */;
992 | sourceTree = BUILT_PRODUCTS_DIR;
993 | };
994 | 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */ = {
995 | isa = PBXReferenceProxy;
996 | fileType = archive.ar;
997 | path = libjschelpers.a;
998 | remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */;
999 | sourceTree = BUILT_PRODUCTS_DIR;
1000 | };
1001 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = {
1002 | isa = PBXReferenceProxy;
1003 | fileType = archive.ar;
1004 | path = libRCTAnimation.a;
1005 | remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */;
1006 | sourceTree = BUILT_PRODUCTS_DIR;
1007 | };
1008 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */ = {
1009 | isa = PBXReferenceProxy;
1010 | fileType = archive.ar;
1011 | path = libRCTAnimation.a;
1012 | remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */;
1013 | sourceTree = BUILT_PRODUCTS_DIR;
1014 | };
1015 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = {
1016 | isa = PBXReferenceProxy;
1017 | fileType = archive.ar;
1018 | path = libRCTLinking.a;
1019 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */;
1020 | sourceTree = BUILT_PRODUCTS_DIR;
1021 | };
1022 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = {
1023 | isa = PBXReferenceProxy;
1024 | fileType = archive.ar;
1025 | path = libRCTText.a;
1026 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
1027 | sourceTree = BUILT_PRODUCTS_DIR;
1028 | };
1029 | ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */ = {
1030 | isa = PBXReferenceProxy;
1031 | fileType = archive.ar;
1032 | path = libRCTBlob.a;
1033 | remoteRef = ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */;
1034 | sourceTree = BUILT_PRODUCTS_DIR;
1035 | };
1036 | /* End PBXReferenceProxy section */
1037 |
1038 | /* Begin PBXResourcesBuildPhase section */
1039 | 00E356EC1AD99517003FC87E /* Resources */ = {
1040 | isa = PBXResourcesBuildPhase;
1041 | buildActionMask = 2147483647;
1042 | files = (
1043 | );
1044 | runOnlyForDeploymentPostprocessing = 0;
1045 | };
1046 | 13B07F8E1A680F5B00A75B9A /* Resources */ = {
1047 | isa = PBXResourcesBuildPhase;
1048 | buildActionMask = 2147483647;
1049 | files = (
1050 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
1051 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
1052 | );
1053 | runOnlyForDeploymentPostprocessing = 0;
1054 | };
1055 | 2D02E4791E0B4A5D006451C7 /* Resources */ = {
1056 | isa = PBXResourcesBuildPhase;
1057 | buildActionMask = 2147483647;
1058 | files = (
1059 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */,
1060 | );
1061 | runOnlyForDeploymentPostprocessing = 0;
1062 | };
1063 | 2D02E48E1E0B4A5D006451C7 /* Resources */ = {
1064 | isa = PBXResourcesBuildPhase;
1065 | buildActionMask = 2147483647;
1066 | files = (
1067 | );
1068 | runOnlyForDeploymentPostprocessing = 0;
1069 | };
1070 | /* End PBXResourcesBuildPhase section */
1071 |
1072 | /* Begin PBXShellScriptBuildPhase section */
1073 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
1074 | isa = PBXShellScriptBuildPhase;
1075 | buildActionMask = 2147483647;
1076 | files = (
1077 | );
1078 | inputPaths = (
1079 | );
1080 | name = "Bundle React Native code and images";
1081 | outputPaths = (
1082 | );
1083 | runOnlyForDeploymentPostprocessing = 0;
1084 | shellPath = /bin/sh;
1085 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
1086 | };
1087 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
1088 | isa = PBXShellScriptBuildPhase;
1089 | buildActionMask = 2147483647;
1090 | files = (
1091 | );
1092 | inputPaths = (
1093 | );
1094 | name = "Bundle React Native Code And Images";
1095 | outputPaths = (
1096 | );
1097 | runOnlyForDeploymentPostprocessing = 0;
1098 | shellPath = /bin/sh;
1099 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
1100 | };
1101 | /* End PBXShellScriptBuildPhase section */
1102 |
1103 | /* Begin PBXSourcesBuildPhase section */
1104 | 00E356EA1AD99517003FC87E /* Sources */ = {
1105 | isa = PBXSourcesBuildPhase;
1106 | buildActionMask = 2147483647;
1107 | files = (
1108 | 00E356F31AD99517003FC87E /* rectnativeTests.m in Sources */,
1109 | );
1110 | runOnlyForDeploymentPostprocessing = 0;
1111 | };
1112 | 13B07F871A680F5B00A75B9A /* Sources */ = {
1113 | isa = PBXSourcesBuildPhase;
1114 | buildActionMask = 2147483647;
1115 | files = (
1116 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
1117 | 13B07FC11A68108700A75B9A /* main.m in Sources */,
1118 | );
1119 | runOnlyForDeploymentPostprocessing = 0;
1120 | };
1121 | 2D02E4771E0B4A5D006451C7 /* Sources */ = {
1122 | isa = PBXSourcesBuildPhase;
1123 | buildActionMask = 2147483647;
1124 | files = (
1125 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */,
1126 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */,
1127 | );
1128 | runOnlyForDeploymentPostprocessing = 0;
1129 | };
1130 | 2D02E48C1E0B4A5D006451C7 /* Sources */ = {
1131 | isa = PBXSourcesBuildPhase;
1132 | buildActionMask = 2147483647;
1133 | files = (
1134 | 2DCD954D1E0B4F2C00145EB5 /* rectnativeTests.m in Sources */,
1135 | );
1136 | runOnlyForDeploymentPostprocessing = 0;
1137 | };
1138 | /* End PBXSourcesBuildPhase section */
1139 |
1140 | /* Begin PBXTargetDependency section */
1141 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
1142 | isa = PBXTargetDependency;
1143 | target = 13B07F861A680F5B00A75B9A /* rectnative */;
1144 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
1145 | };
1146 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = {
1147 | isa = PBXTargetDependency;
1148 | target = 2D02E47A1E0B4A5D006451C7 /* rectnative-tvOS */;
1149 | targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */;
1150 | };
1151 | /* End PBXTargetDependency section */
1152 |
1153 | /* Begin PBXVariantGroup section */
1154 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = {
1155 | isa = PBXVariantGroup;
1156 | children = (
1157 | 13B07FB21A68108700A75B9A /* Base */,
1158 | );
1159 | name = LaunchScreen.xib;
1160 | path = rectnative;
1161 | sourceTree = "";
1162 | };
1163 | /* End PBXVariantGroup section */
1164 |
1165 | /* Begin XCBuildConfiguration section */
1166 | 00E356F61AD99517003FC87E /* Debug */ = {
1167 | isa = XCBuildConfiguration;
1168 | buildSettings = {
1169 | BUNDLE_LOADER = "$(TEST_HOST)";
1170 | GCC_PREPROCESSOR_DEFINITIONS = (
1171 | "DEBUG=1",
1172 | "$(inherited)",
1173 | );
1174 | INFOPLIST_FILE = rectnativeTests/Info.plist;
1175 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
1176 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1177 | OTHER_LDFLAGS = (
1178 | "-ObjC",
1179 | "-lc++",
1180 | );
1181 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
1182 | PRODUCT_NAME = "$(TARGET_NAME)";
1183 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/rectnative.app/rectnative";
1184 | };
1185 | name = Debug;
1186 | };
1187 | 00E356F71AD99517003FC87E /* Release */ = {
1188 | isa = XCBuildConfiguration;
1189 | buildSettings = {
1190 | BUNDLE_LOADER = "$(TEST_HOST)";
1191 | COPY_PHASE_STRIP = NO;
1192 | INFOPLIST_FILE = rectnativeTests/Info.plist;
1193 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
1194 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1195 | OTHER_LDFLAGS = (
1196 | "-ObjC",
1197 | "-lc++",
1198 | );
1199 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
1200 | PRODUCT_NAME = "$(TARGET_NAME)";
1201 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/rectnative.app/rectnative";
1202 | };
1203 | name = Release;
1204 | };
1205 | 13B07F941A680F5B00A75B9A /* Debug */ = {
1206 | isa = XCBuildConfiguration;
1207 | buildSettings = {
1208 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1209 | CURRENT_PROJECT_VERSION = 1;
1210 | DEAD_CODE_STRIPPING = NO;
1211 | INFOPLIST_FILE = rectnative/Info.plist;
1212 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1213 | OTHER_LDFLAGS = (
1214 | "$(inherited)",
1215 | "-ObjC",
1216 | "-lc++",
1217 | );
1218 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
1219 | PRODUCT_NAME = rectnative;
1220 | VERSIONING_SYSTEM = "apple-generic";
1221 | };
1222 | name = Debug;
1223 | };
1224 | 13B07F951A680F5B00A75B9A /* Release */ = {
1225 | isa = XCBuildConfiguration;
1226 | buildSettings = {
1227 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1228 | CURRENT_PROJECT_VERSION = 1;
1229 | INFOPLIST_FILE = rectnative/Info.plist;
1230 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1231 | OTHER_LDFLAGS = (
1232 | "$(inherited)",
1233 | "-ObjC",
1234 | "-lc++",
1235 | );
1236 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
1237 | PRODUCT_NAME = rectnative;
1238 | VERSIONING_SYSTEM = "apple-generic";
1239 | };
1240 | name = Release;
1241 | };
1242 | 2D02E4971E0B4A5E006451C7 /* Debug */ = {
1243 | isa = XCBuildConfiguration;
1244 | buildSettings = {
1245 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
1246 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
1247 | CLANG_ANALYZER_NONNULL = YES;
1248 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1249 | CLANG_WARN_INFINITE_RECURSION = YES;
1250 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
1251 | DEBUG_INFORMATION_FORMAT = dwarf;
1252 | ENABLE_TESTABILITY = YES;
1253 | GCC_NO_COMMON_BLOCKS = YES;
1254 | INFOPLIST_FILE = "rectnative-tvOS/Info.plist";
1255 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1256 | OTHER_LDFLAGS = (
1257 | "-ObjC",
1258 | "-lc++",
1259 | );
1260 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.rectnative-tvOS";
1261 | PRODUCT_NAME = "$(TARGET_NAME)";
1262 | SDKROOT = appletvos;
1263 | TARGETED_DEVICE_FAMILY = 3;
1264 | TVOS_DEPLOYMENT_TARGET = 9.2;
1265 | };
1266 | name = Debug;
1267 | };
1268 | 2D02E4981E0B4A5E006451C7 /* Release */ = {
1269 | isa = XCBuildConfiguration;
1270 | buildSettings = {
1271 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
1272 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
1273 | CLANG_ANALYZER_NONNULL = YES;
1274 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1275 | CLANG_WARN_INFINITE_RECURSION = YES;
1276 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
1277 | COPY_PHASE_STRIP = NO;
1278 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
1279 | GCC_NO_COMMON_BLOCKS = YES;
1280 | INFOPLIST_FILE = "rectnative-tvOS/Info.plist";
1281 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1282 | OTHER_LDFLAGS = (
1283 | "-ObjC",
1284 | "-lc++",
1285 | );
1286 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.rectnative-tvOS";
1287 | PRODUCT_NAME = "$(TARGET_NAME)";
1288 | SDKROOT = appletvos;
1289 | TARGETED_DEVICE_FAMILY = 3;
1290 | TVOS_DEPLOYMENT_TARGET = 9.2;
1291 | };
1292 | name = Release;
1293 | };
1294 | 2D02E4991E0B4A5E006451C7 /* Debug */ = {
1295 | isa = XCBuildConfiguration;
1296 | buildSettings = {
1297 | BUNDLE_LOADER = "$(TEST_HOST)";
1298 | CLANG_ANALYZER_NONNULL = YES;
1299 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1300 | CLANG_WARN_INFINITE_RECURSION = YES;
1301 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
1302 | DEBUG_INFORMATION_FORMAT = dwarf;
1303 | ENABLE_TESTABILITY = YES;
1304 | GCC_NO_COMMON_BLOCKS = YES;
1305 | INFOPLIST_FILE = "rectnative-tvOSTests/Info.plist";
1306 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1307 | OTHER_LDFLAGS = (
1308 | "-ObjC",
1309 | "-lc++",
1310 | );
1311 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.rectnative-tvOSTests";
1312 | PRODUCT_NAME = "$(TARGET_NAME)";
1313 | SDKROOT = appletvos;
1314 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/rectnative-tvOS.app/rectnative-tvOS";
1315 | TVOS_DEPLOYMENT_TARGET = 10.1;
1316 | };
1317 | name = Debug;
1318 | };
1319 | 2D02E49A1E0B4A5E006451C7 /* Release */ = {
1320 | isa = XCBuildConfiguration;
1321 | buildSettings = {
1322 | BUNDLE_LOADER = "$(TEST_HOST)";
1323 | CLANG_ANALYZER_NONNULL = YES;
1324 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1325 | CLANG_WARN_INFINITE_RECURSION = YES;
1326 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
1327 | COPY_PHASE_STRIP = NO;
1328 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
1329 | GCC_NO_COMMON_BLOCKS = YES;
1330 | INFOPLIST_FILE = "rectnative-tvOSTests/Info.plist";
1331 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1332 | OTHER_LDFLAGS = (
1333 | "-ObjC",
1334 | "-lc++",
1335 | );
1336 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.rectnative-tvOSTests";
1337 | PRODUCT_NAME = "$(TARGET_NAME)";
1338 | SDKROOT = appletvos;
1339 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/rectnative-tvOS.app/rectnative-tvOS";
1340 | TVOS_DEPLOYMENT_TARGET = 10.1;
1341 | };
1342 | name = Release;
1343 | };
1344 | 83CBBA201A601CBA00E9B192 /* Debug */ = {
1345 | isa = XCBuildConfiguration;
1346 | buildSettings = {
1347 | ALWAYS_SEARCH_USER_PATHS = NO;
1348 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
1349 | CLANG_CXX_LIBRARY = "libc++";
1350 | CLANG_ENABLE_MODULES = YES;
1351 | CLANG_ENABLE_OBJC_ARC = YES;
1352 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
1353 | CLANG_WARN_BOOL_CONVERSION = YES;
1354 | CLANG_WARN_COMMA = YES;
1355 | CLANG_WARN_CONSTANT_CONVERSION = YES;
1356 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
1357 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
1358 | CLANG_WARN_EMPTY_BODY = YES;
1359 | CLANG_WARN_ENUM_CONVERSION = YES;
1360 | CLANG_WARN_INFINITE_RECURSION = YES;
1361 | CLANG_WARN_INT_CONVERSION = YES;
1362 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
1363 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
1364 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
1365 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
1366 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
1367 | CLANG_WARN_STRICT_PROTOTYPES = YES;
1368 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
1369 | CLANG_WARN_UNREACHABLE_CODE = YES;
1370 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
1371 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1372 | COPY_PHASE_STRIP = NO;
1373 | ENABLE_STRICT_OBJC_MSGSEND = YES;
1374 | ENABLE_TESTABILITY = YES;
1375 | GCC_C_LANGUAGE_STANDARD = gnu99;
1376 | GCC_DYNAMIC_NO_PIC = NO;
1377 | GCC_NO_COMMON_BLOCKS = YES;
1378 | GCC_OPTIMIZATION_LEVEL = 0;
1379 | GCC_PREPROCESSOR_DEFINITIONS = (
1380 | "DEBUG=1",
1381 | "$(inherited)",
1382 | );
1383 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
1384 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
1385 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
1386 | GCC_WARN_UNDECLARED_SELECTOR = YES;
1387 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
1388 | GCC_WARN_UNUSED_FUNCTION = YES;
1389 | GCC_WARN_UNUSED_VARIABLE = YES;
1390 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
1391 | MTL_ENABLE_DEBUG_INFO = YES;
1392 | ONLY_ACTIVE_ARCH = YES;
1393 | SDKROOT = iphoneos;
1394 | };
1395 | name = Debug;
1396 | };
1397 | 83CBBA211A601CBA00E9B192 /* Release */ = {
1398 | isa = XCBuildConfiguration;
1399 | buildSettings = {
1400 | ALWAYS_SEARCH_USER_PATHS = NO;
1401 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
1402 | CLANG_CXX_LIBRARY = "libc++";
1403 | CLANG_ENABLE_MODULES = YES;
1404 | CLANG_ENABLE_OBJC_ARC = YES;
1405 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
1406 | CLANG_WARN_BOOL_CONVERSION = YES;
1407 | CLANG_WARN_COMMA = YES;
1408 | CLANG_WARN_CONSTANT_CONVERSION = YES;
1409 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
1410 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
1411 | CLANG_WARN_EMPTY_BODY = YES;
1412 | CLANG_WARN_ENUM_CONVERSION = YES;
1413 | CLANG_WARN_INFINITE_RECURSION = YES;
1414 | CLANG_WARN_INT_CONVERSION = YES;
1415 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
1416 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
1417 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
1418 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
1419 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
1420 | CLANG_WARN_STRICT_PROTOTYPES = YES;
1421 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
1422 | CLANG_WARN_UNREACHABLE_CODE = YES;
1423 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
1424 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1425 | COPY_PHASE_STRIP = YES;
1426 | ENABLE_NS_ASSERTIONS = NO;
1427 | ENABLE_STRICT_OBJC_MSGSEND = YES;
1428 | GCC_C_LANGUAGE_STANDARD = gnu99;
1429 | GCC_NO_COMMON_BLOCKS = YES;
1430 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
1431 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
1432 | GCC_WARN_UNDECLARED_SELECTOR = YES;
1433 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
1434 | GCC_WARN_UNUSED_FUNCTION = YES;
1435 | GCC_WARN_UNUSED_VARIABLE = YES;
1436 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
1437 | MTL_ENABLE_DEBUG_INFO = NO;
1438 | SDKROOT = iphoneos;
1439 | VALIDATE_PRODUCT = YES;
1440 | };
1441 | name = Release;
1442 | };
1443 | /* End XCBuildConfiguration section */
1444 |
1445 | /* Begin XCConfigurationList section */
1446 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "rectnativeTests" */ = {
1447 | isa = XCConfigurationList;
1448 | buildConfigurations = (
1449 | 00E356F61AD99517003FC87E /* Debug */,
1450 | 00E356F71AD99517003FC87E /* Release */,
1451 | );
1452 | defaultConfigurationIsVisible = 0;
1453 | defaultConfigurationName = Release;
1454 | };
1455 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "rectnative" */ = {
1456 | isa = XCConfigurationList;
1457 | buildConfigurations = (
1458 | 13B07F941A680F5B00A75B9A /* Debug */,
1459 | 13B07F951A680F5B00A75B9A /* Release */,
1460 | );
1461 | defaultConfigurationIsVisible = 0;
1462 | defaultConfigurationName = Release;
1463 | };
1464 | 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "rectnative-tvOS" */ = {
1465 | isa = XCConfigurationList;
1466 | buildConfigurations = (
1467 | 2D02E4971E0B4A5E006451C7 /* Debug */,
1468 | 2D02E4981E0B4A5E006451C7 /* Release */,
1469 | );
1470 | defaultConfigurationIsVisible = 0;
1471 | defaultConfigurationName = Release;
1472 | };
1473 | 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "rectnative-tvOSTests" */ = {
1474 | isa = XCConfigurationList;
1475 | buildConfigurations = (
1476 | 2D02E4991E0B4A5E006451C7 /* Debug */,
1477 | 2D02E49A1E0B4A5E006451C7 /* Release */,
1478 | );
1479 | defaultConfigurationIsVisible = 0;
1480 | defaultConfigurationName = Release;
1481 | };
1482 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "rectnative" */ = {
1483 | isa = XCConfigurationList;
1484 | buildConfigurations = (
1485 | 83CBBA201A601CBA00E9B192 /* Debug */,
1486 | 83CBBA211A601CBA00E9B192 /* Release */,
1487 | );
1488 | defaultConfigurationIsVisible = 0;
1489 | defaultConfigurationName = Release;
1490 | };
1491 | /* End XCConfigurationList section */
1492 | };
1493 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
1494 | }
1495 |
--------------------------------------------------------------------------------
/examples/reactnative/ios/rectnative.xcodeproj/xcshareddata/xcschemes/rectnative-tvOS.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
43 |
49 |
50 |
51 |
52 |
53 |
58 |
59 |
61 |
67 |
68 |
69 |
70 |
71 |
77 |
78 |
79 |
80 |
81 |
82 |
92 |
94 |
100 |
101 |
102 |
103 |
104 |
105 |
111 |
113 |
119 |
120 |
121 |
122 |
124 |
125 |
128 |
129 |
130 |
--------------------------------------------------------------------------------
/examples/reactnative/ios/rectnative.xcodeproj/xcshareddata/xcschemes/rectnative.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
43 |
49 |
50 |
51 |
52 |
53 |
58 |
59 |
61 |
67 |
68 |
69 |
70 |
71 |
77 |
78 |
79 |
80 |
81 |
82 |
92 |
94 |
100 |
101 |
102 |
103 |
104 |
105 |
111 |
113 |
119 |
120 |
121 |
122 |
124 |
125 |
128 |
129 |
130 |
--------------------------------------------------------------------------------
/examples/reactnative/ios/rectnative/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import
9 |
10 | @interface AppDelegate : UIResponder
11 |
12 | @property (nonatomic, strong) UIWindow *window;
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/examples/reactnative/ios/rectnative/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import "AppDelegate.h"
9 |
10 | #import
11 | #import
12 |
13 | @implementation AppDelegate
14 |
15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
16 | {
17 | NSURL *jsCodeLocation;
18 |
19 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
20 |
21 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
22 | moduleName:@"rectnative"
23 | initialProperties:nil
24 | launchOptions:launchOptions];
25 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
26 |
27 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
28 | UIViewController *rootViewController = [UIViewController new];
29 | rootViewController.view = rootView;
30 | self.window.rootViewController = rootViewController;
31 | [self.window makeKeyAndVisible];
32 | return YES;
33 | }
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/examples/reactnative/ios/rectnative/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
21 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/examples/reactnative/ios/rectnative/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/examples/reactnative/ios/rectnative/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/examples/reactnative/ios/rectnative/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | rectnative
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSRequiresIPhoneOS
26 |
27 | NSLocationWhenInUseUsageDescription
28 |
29 | UILaunchStoryboardName
30 | LaunchScreen
31 | UIRequiredDeviceCapabilities
32 |
33 | armv7
34 |
35 | UISupportedInterfaceOrientations
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationLandscapeLeft
39 | UIInterfaceOrientationLandscapeRight
40 |
41 | UIViewControllerBasedStatusBarAppearance
42 |
43 | NSLocationWhenInUseUsageDescription
44 |
45 | NSAppTransportSecurity
46 |
47 |
48 | NSAllowsArbitraryLoads
49 |
50 | NSExceptionDomains
51 |
52 | localhost
53 |
54 | NSExceptionAllowsInsecureHTTPLoads
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/examples/reactnative/ios/rectnative/main.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import
9 |
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/examples/reactnative/ios/rectnativeTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/reactnative/ios/rectnativeTests/rectnativeTests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import
9 | #import
10 |
11 | #import
12 | #import
13 |
14 | #define TIMEOUT_SECONDS 600
15 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
16 |
17 | @interface rectnativeTests : XCTestCase
18 |
19 | @end
20 |
21 | @implementation rectnativeTests
22 |
23 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
24 | {
25 | if (test(view)) {
26 | return YES;
27 | }
28 | for (UIView *subview in [view subviews]) {
29 | if ([self findSubviewInView:subview matching:test]) {
30 | return YES;
31 | }
32 | }
33 | return NO;
34 | }
35 |
36 | - (void)testRendersWelcomeScreen
37 | {
38 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
39 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
40 | BOOL foundElement = NO;
41 |
42 | __block NSString *redboxError = nil;
43 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
44 | if (level >= RCTLogLevelError) {
45 | redboxError = message;
46 | }
47 | });
48 |
49 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
50 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
51 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
52 |
53 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
54 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
55 | return YES;
56 | }
57 | return NO;
58 | }];
59 | }
60 |
61 | RCTSetLogFunction(RCTDefaultLogFunction);
62 |
63 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
64 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
65 | }
66 |
67 |
68 | @end
69 |
--------------------------------------------------------------------------------
/examples/reactnative/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "reactnative",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "start": "node node_modules/react-native/local-cli/cli.js start",
7 | "test": "jest"
8 | },
9 | "dependencies": {
10 | "i18nh": "0.0.3",
11 | "react": "16.6.0-alpha.8af6728",
12 | "react-native": "0.57.4"
13 | },
14 | "devDependencies": {
15 | "babel-jest": "23.6.0",
16 | "jest": "23.6.0",
17 | "metro-react-native-babel-preset": "0.49.0",
18 | "react-test-renderer": "16.6.0-alpha.8af6728"
19 | },
20 | "jest": {
21 | "preset": "react-native"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/examples/vanila/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | i18nh
6 |
7 |
8 |
9 | Hello World
10 |
11 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/examples/vue-example/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 | # local env files
6 | .env.local
7 | .env.*.local
8 |
9 | # Log files
10 | npm-debug.log*
11 | yarn-debug.log*
12 | yarn-error.log*
13 |
14 | # Editor directories and files
15 | .idea
16 | .vscode
17 | *.suo
18 | *.ntvs*
19 | *.njsproj
20 | *.sln
21 | *.sw*
22 |
--------------------------------------------------------------------------------
/examples/vue-example/README.md:
--------------------------------------------------------------------------------
1 | # vue-example
2 |
3 | ## Project setup
4 | ```
5 | npm install
6 | ```
7 |
8 | ### Compiles and hot-reloads for development
9 | ```
10 | npm run serve
11 | ```
12 |
13 | ### Compiles and minifies for production
14 | ```
15 | npm run build
16 | ```
17 |
18 | ### Run your tests
19 | ```
20 | npm run test
21 | ```
22 |
23 | ### Lints and fixes files
24 | ```
25 | npm run lint
26 | ```
27 |
--------------------------------------------------------------------------------
/examples/vue-example/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/app'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/examples/vue-example/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue-example",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "i18nh": "0.0.3",
12 | "vue": "^2.5.17"
13 | },
14 | "devDependencies": {
15 | "@vue/cli-plugin-babel": "^3.0.5",
16 | "@vue/cli-plugin-eslint": "^3.0.5",
17 | "@vue/cli-service": "^3.0.5",
18 | "babel-eslint": "^10.0.1",
19 | "eslint": "^5.8.0",
20 | "eslint-plugin-vue": "^5.0.0-0",
21 | "vue-template-compiler": "^2.5.17"
22 | },
23 | "eslintConfig": {
24 | "root": true,
25 | "env": {
26 | "node": true
27 | },
28 | "extends": [
29 | "plugin:vue/essential",
30 | "eslint:recommended"
31 | ],
32 | "rules": {},
33 | "parserOptions": {
34 | "parser": "babel-eslint"
35 | }
36 | },
37 | "postcss": {
38 | "plugins": {
39 | "autoprefixer": {}
40 | }
41 | },
42 | "browserslist": [
43 | "> 1%",
44 | "last 2 versions",
45 | "not ie <= 8"
46 | ]
47 | }
48 |
--------------------------------------------------------------------------------
/examples/vue-example/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigooler/i18nh/48c0036bc54a770cb588e7812f8d72339930bd01/examples/vue-example/public/favicon.ico
--------------------------------------------------------------------------------
/examples/vue-example/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | vue-example
9 |
10 |
11 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/examples/vue-example/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |

4 |
5 |
6 |
7 |
8 |
18 |
19 |
29 |
--------------------------------------------------------------------------------
/examples/vue-example/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigooler/i18nh/48c0036bc54a770cb588e7812f8d72339930bd01/examples/vue-example/src/assets/logo.png
--------------------------------------------------------------------------------
/examples/vue-example/src/components/HelloWorld.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
{{greeting|t}} (or {{greeting|t('pt')}}) {{ msg }}
4 |
5 | For guide and recipes on how to configure / customize this project,
6 | check out the
7 | vue-cli documentation.
8 |
9 |
Installed CLI Plugins
10 |
14 |
Essential Links
15 |
22 |
Ecosystem
23 |
30 |
31 |
32 |
33 |
42 |
43 |
44 |
60 |
--------------------------------------------------------------------------------
/examples/vue-example/src/i18nh.map.js:
--------------------------------------------------------------------------------
1 | export const languages = {
2 | en: {
3 | hello: 'Hello',
4 | about: 'About',
5 | goodMorning: 'Good Morning',
6 | },
7 | pt: {
8 | hello: 'Olá',
9 | about: 'Sobre',
10 | goodMorning: 'Bom Dia',
11 | },
12 | };
--------------------------------------------------------------------------------
/examples/vue-example/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './App.vue'
3 | import {languages} from './i18nh.map';
4 | import i18nh, { useT } from 'i18nh'
5 |
6 | Vue.config.productionTip = false
7 |
8 | i18nh({
9 | languages,
10 | defaultLanguage: 'en'
11 | });
12 |
13 | Vue.filter('t', function (value, args) {
14 | if (!value) return ''
15 | value = value.toString().toLowerCase();
16 | const [t] = useT();
17 | return t(value, args)
18 | })
19 |
20 | new Vue({
21 | render: h => h(App),
22 | }).$mount('#app')
23 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | let initLangs = {}
4 | let fallBackLang = null
5 | let debug = false
6 |
7 | const i18nh = ({ languages, defaultLanguage, activeDebug }) => {
8 | initLangs = languages
9 | fallBackLang = defaultLanguage
10 | debug = activeDebug
11 |
12 | if (activeDebug) {
13 | console.info('Debug: Translations uploaded successfully!')
14 | }
15 | }
16 |
17 | const getValueByLang = (key, lang) =>
18 | initLangs[lang] && initLangs[lang].hasOwnProperty(key)
19 | ? initLangs[lang][key]
20 | : key
21 |
22 | const t = lang => key => {
23 | const result = lang ? getValueByLang(key, lang) : initLangs[fallBackLang][key]
24 |
25 | if (debug) {
26 | console.info(`Debug: Translate ${key}, ${result}`)
27 | }
28 |
29 | return result
30 | }
31 |
32 | const useT = (lang) => [t(lang)]
33 |
34 | module.exports = i18nh
35 | module.exports.useT = useT
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "i18nh",
3 | "description": "i18n simplified and made to solve the problem of internationalization using the concept of hook (react)",
4 | "version": "0.0.5",
5 | "author": "Rodrigo Oler ",
6 | "license": "MIT",
7 | "main": "index.js",
8 | "private": false,
9 | "repository": {
10 | "type": "git",
11 | "url": "git+ssh://git@github.com/rodrigooler/i18nh.git"
12 | },
13 | "bugs": {
14 | "url": "https://github.com/rodrigooler/i18nh/issues"
15 | },
16 | "homepage": "https://github.com/rodrigooler/i18nh#readme",
17 | "directories": {
18 | "example": "examples"
19 | },
20 | "devDependencies": {},
21 | "scripts": {
22 | "test": "echo \"Error: no test specified\" && exit 1"
23 | },
24 | "keywords": [
25 | "i18nh",
26 | "i18n",
27 | "node",
28 | "javascript",
29 | "typescript",
30 | "react",
31 | "nextjs",
32 | "hook",
33 | "create-react-app",
34 | "angular",
35 | "vue",
36 | "aurelia",
37 | "react-native",
38 | "nativescript"
39 | ]
40 | }
41 |
--------------------------------------------------------------------------------