diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 000000000..812bd3165 --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,54 @@ +name: documentation + +on: + pull_request: + branches: [master] + push: + branches: [master] + +jobs: + checks: + if: github.event_name != 'push' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: '12.x' + - name: Test Build + run: | + cd documentation + yarn install --frozen-lockfile + npm run build + gh-release: + if: github.event_name != 'pull_request' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: '12.x' + - name: Add key to allow access to repository + env: + SSH_AUTH_SOCK: /tmp/ssh_agent.sock + run: | + mkdir -p ~/.ssh + ssh-keyscan github.com >> ~/.ssh/known_hosts + echo "${{ secrets.GH_PAGES_DEPLOY }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + cat <> ~/.ssh/config + Host github.com + HostName github.com + IdentityFile ~/.ssh/id_rsa + EOT + - name: Release to GitHub Pages + env: + USE_SSH: true + GIT_USER: git + DEPLOYMENT_BRANCH: gh-pages + run: | + git config --global user.email "actions@gihub.com" + git config --global user.name "gh-actions" + cd documentation + yarn install --frozen-lockfile + yarn deploy \ No newline at end of file diff --git a/.gitignore b/.gitignore index ad572e632..fbebf5fe3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,25 +2,6 @@ # .DS_Store -# Xcode -# -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata -*.xccheckout -*.moved-aside -DerivedData -*.hmap -*.ipa -*.xcuserstate - # Android/IntelliJ # build/ @@ -31,29 +12,14 @@ local.properties # node.js # -node_modules/ npm-debug.log yarn-error.log -# BUCK -buck-out/ -\.buckd/ -*.keystore -!debug.keystore - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://docs.fastlane.tools/best-practices/source-control/ - -*/fastlane/report.xml -*/fastlane/Preview.html -*/fastlane/screenshots - -# Bundle artifact -*.jsbundle - -# CocoaPods -/ios/Pods/ +# Ignore specific files copying by RN CLI +template/.gitignore +template/.gitattributes +template/.eslintrc.js +template/.flowconfig +template/.buckconfig +template/.prettierrc.js +template/.watchmanconfig diff --git a/.npmignore b/.npmignore new file mode 100644 index 000000000..e3f90de29 --- /dev/null +++ b/.npmignore @@ -0,0 +1,6 @@ +.DS_Store +templates/node_modules +templates/ios/Pods +documentation +.idea +.github diff --git a/App/App.tsx b/App/App.tsx deleted file mode 100644 index 4efc5c47c..000000000 --- a/App/App.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React, { Component } from 'react' -import { Provider } from 'react-redux' -import { PersistGate } from 'redux-persist/lib/integration/react' -import createStore from 'App/Stores' -import RootScreen from './Containers/Root/RootScreen' - -const { store, persistor } = createStore() - -export default class App extends Component { - render() { - return ( - /** - * @see https://github.com/reduxjs/react-redux/blob/master/docs/api/Provider.md - */ - - {/** - * PersistGate delays the rendering of the app's UI until the persisted state has been retrieved - * and saved to redux. - * The `loading` prop can be `null` or any react instance to show during loading (e.g. a splash screen), - * for example `loading={}`. - * @see https://github.com/rt2zz/redux-persist/blob/master/docs/PersistGate.md - */} - - - - - ) - } -} diff --git a/App/Assets/Images/TOM-Legend.png b/App/Assets/Images/TOM-Legend.png deleted file mode 100644 index 904a226ff..000000000 Binary files a/App/Assets/Images/TOM-Legend.png and /dev/null differ diff --git a/App/Assets/Images/TOM.png b/App/Assets/Images/TOM.png deleted file mode 100644 index 084f2e9a5..000000000 Binary files a/App/Assets/Images/TOM.png and /dev/null differ diff --git a/App/Assets/Images/ts.png b/App/Assets/Images/ts.png deleted file mode 100644 index 1f0b9c8a7..000000000 Binary files a/App/Assets/Images/ts.png and /dev/null differ diff --git a/App/Assets/README.md b/App/Assets/README.md deleted file mode 100644 index db3b0bbcc..000000000 --- a/App/Assets/README.md +++ /dev/null @@ -1 +0,0 @@ -This directory contains all the assets files (i.e. images, audio files or videos...) used by the application. diff --git a/App/Components/README.md b/App/Components/README.md deleted file mode 100644 index 88e663034..000000000 --- a/App/Components/README.md +++ /dev/null @@ -1 +0,0 @@ -This directory contains [presentational components](https://medium.com/@dan_abramov/smart-and-dumb-components-7ca2f9a7c7d0), i.e. React components responsible for the UI of the application. diff --git a/App/Config/README.md b/App/Config/README.md deleted file mode 100644 index 0ee1f4a11..000000000 --- a/App/Config/README.md +++ /dev/null @@ -1,25 +0,0 @@ -This directory contains configuration variables in 3 files: -- `index.dev.ts` : contains development variables -- `index.production.ts` : contains production variables -- `index.staging.ts` : contains beta tests variables - -You need to create `index.ts` by copying the right file. - -#### Warning -Each time you need to build, you need to verify if your `index.ts` is the right one. -For example, during development, before building your app do: -``` -cp App\Config\index.dev.ts App\Config\index.ts -``` -In other environment, you must pay attention to change your `index.ts` with the good one. -Also, make sure you add each configuration variable in each configuration file. - -#### Usage -``` -import Config from 'App/Config' - -... -let uri = Config.API_URL -... - -``` diff --git a/App/Config/index.production.ts b/App/Config/index.production.ts deleted file mode 100644 index 7e37aa499..000000000 --- a/App/Config/index.production.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const Config = { - API_URL: 'https://jsonplaceholder.typicode.com/users/', -} diff --git a/App/Config/index.staging.ts b/App/Config/index.staging.ts deleted file mode 100644 index 7e37aa499..000000000 --- a/App/Config/index.staging.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const Config = { - API_URL: 'https://jsonplaceholder.typicode.com/users/', -} diff --git a/App/Config/index.ts b/App/Config/index.ts deleted file mode 100644 index 7e37aa499..000000000 --- a/App/Config/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const Config = { - API_URL: 'https://jsonplaceholder.typicode.com/users/', -} diff --git a/App/Containers/Example/ExampleScreen.tsx b/App/Containers/Example/ExampleScreen.tsx deleted file mode 100644 index d0f91c885..000000000 --- a/App/Containers/Example/ExampleScreen.tsx +++ /dev/null @@ -1,85 +0,0 @@ -import React, { FunctionComponent, useEffect } from 'react' -import { Platform, Text, View, Button, ActivityIndicator, Image } from 'react-native' -import { connect } from 'react-redux' -import ExampleActions from 'App/Stores/Example/Actions' -import { liveInEurope } from 'App/Stores/Example/Selectors' -import Style from './ExampleScreenStyle' -import { Images } from 'App/Theme' -import { Dispatch } from 'redux' -import { AppState } from 'App/Stores' - -/** - * This is an example of a container component. - * - * This screen displays a little help message and informations about a fake user. - * Feel free to remove it. - */ - -const instructions = Platform.select({ - ios: 'Press Cmd+R to reload,\nCmd+D or shake for dev menu.', - android: 'Double tap R on your keyboard to reload,\nShake or press menu button for dev menu.', -}) - -interface ExampleScreenBaseProps { - fetchUser: typeof ExampleActions.fetchUser; - user?: { name?: string }; - userIsLoading: boolean; - userErrorMessage: string; -} - -const ExampleScreenBase: FunctionComponent = ({ - fetchUser, - userIsLoading, - userErrorMessage, - user, -}) => { - useEffect(() => { - fetchUser() - }, [fetchUser]) - - return ( - - {userIsLoading ? ( - - ) : ( - - - - - To get started, edit App.js - {instructions} - {userErrorMessage ? ( - {userErrorMessage} - ) : ( - - - {"I'm a fake user, my name is "} - {user && user.name} - - - {liveInEurope ? 'I live in Europe !' : "I don't live in Europe."} - - - )} -