Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: structure upgrade #254

Merged
merged 18 commits into from
Jan 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
40 changes: 0 additions & 40 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/---bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: "\U0001F41B Bug report"
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

<!-- Love UI Kitten? Please leave feedback: 👉 https://github.com/akveo/react-native-ui-kitten/issues/657 -->

## 🐛 Bug Report

<!-- A clear and concise description of what the bug is. -->

## To Reproduce

Steps to reproduce the behavior:

## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

## Link to runnable example or repository (highly encouraged)

<!--
Please provide either a [codesandbox demo](https://codesandbox.io/s/ui-kitten-welcome-x8q8z) or a minimal repository on GitHub.
This will help us to resolve it faster.
-->

## UI Kitten and Eva version

| Package | Version |
| ----------- | ----------- |
| @eva-design/eva | |
| @ui-kitten/components | |

## Environment information

<!--
Run npx envinfo --preset react-native
Paste the results here:
-->

```bash

```
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/---question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: "\U0001F4AC Question"
about: Submit a question related to UI Kitten
title: ''
labels: ":grey_question: Help wanted"
assignees: ''

---

<!-- Love UI Kitten? Please leave feedback: 👉 https://github.com/akveo/react-native-ui-kitten/issues/657 -->

## 💬 Question

## UI Kitten and Eva version

| Package | Version |
| ----------- | ----------- |
| @eva-design/eva | |
| @ui-kitten/components | |
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/--feature-proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: "\U0001F680Feature Proposal"
about: Submit a proposal for a new feature
title: ''
labels: ":bulb: Proposal"
assignees: ''

---

<!-- Love UI Kitten? Please leave feedback: 👉 https://github.com/akveo/react-native-ui-kitten/issues/657 -->

## 🚀 Feature Proposal

A clear and concise description of what the feature is.

## Motivation

Please outline the motivation for the proposal.

## Example

Please provide an example for how this feature would be used.
30 changes: 30 additions & 0 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Node CI
on:
push:
branches:
- master

pull_request:
branches:
- master

jobs:
build:
name: Running TypeScript compiler, TSLint and Jest
runs-on: macos-latest
steps:
- uses: actions/checkout@v1

- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: '13.x'

- name: Install
run: yarn

- name: Lint
run: npm run lint

- name: Build
run: npm run build
11 changes: 6 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ local.properties
node_modules/
npm-debug.log

# docs
docs/docs.json
docs/output.json
# env
env/index.js
tsconfig.json

# config
config/index.js
# expo

.expo
.expo-shared/
web-build/

dist
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion App.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import App from './src/app.component';
import App from './src/app/app.component';

export default App;
63 changes: 62 additions & 1 deletion DEV_DOCS.md
Original file line number Diff line number Diff line change
@@ -1 +1,62 @@
Please have a look at [UI Kitten Dev Docs](https://github.com/akveo/react-native-ui-kitten/blob/master/DEV_DOCS.md).
[Running](#running)

[Reusing Screens](#reusing-screens)

# Running

`yarn && yarn start` from the project root

## Environments:

Kitten Tricks application supports two environments:

- **Production** (Provides Eva Design System and UI Kitten modules published to npm)
- **Development** (Provides local Eva Design System and UI Kitten modules)

### Run in production mode:

`npm start`

### Run in development mode:

- Clone Eva Design System and UI Kitten projects to the directory containing Kitten Tricks:
```bash
git clone https://github.com/eva-design/eva && git clone https://github.com/akveo/react-native-ui-kitten
```

- **IMPORTANT:** Ensure you have the following structure of repositories:
```
- /
- eva
- kittenTricks
- react-native-ui-kitten
```
- Install dependencies if needed and finally run `npm run start:dev`

# Reusing Screens

All screens presented in Kitten Tricks application are listed in [`./src/scenes`](./src/scenes) directory and structured by following categories:

- [Auth](./src/scenes/auth)
- [Social](./src/scenes/social)
- [Articles](./src/scenes/articles)
- [Messaging](./src/scenes/messaging)
- [Dashboards](./src/scenes/dashboards)
- [Ecommerce](./src/scenes/ecommerce)

If you would like to reuse it, you may copy and paste the entire screen folder.

Some of the screens may contain 3rd-party modules that need to be installed.
You can find them in `3rd-party.ts` files.

E.g in case of reusing `Forgot Password` screen, you may need:
- Copy [Forgot Password](./src/scenes/auth/forgot-password) directory into your project
- Install and configure 3rd-party modules listed in [3rd-party.ts](./src/scenes/auth/forgot-password/extra/3rd-party.ts) file.

## Structure

Each screen is structured in the same way:

- index.ts - Screen itself
- extra - Directory containing components, data, and 3rd-party modules used by screen
- assets - Directory containing assets used by screen
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Kitten Tricks [<img src="https://i.imgur.com/oMcxwZ0.png" alt="Eva Design System" height="20px" />][link:eva] [![Build Status][badge:travis]][link:travis]
# Kitten Tricks [<img src="https://i.imgur.com/oMcxwZ0.png" alt="Eva Design System" height="20px" />][link:eva] [![Build Status][badge:github-actions]][link:github-actions]

This perfect starter kit is an app based on React Native and [**UI Kitten library**][link:ui-kitten] with Light and Dark themes support. It’s completely free and Open Source.
Compose the application from available screens, add backend integration and you will end up with A-grade cross-platform mobile application.
Expand Down Expand Up @@ -51,9 +51,9 @@ Easy way to integrate UI Kitten with backend ([Java][link:ui-kitten-bundle-java]
Made with :heart: by [Akveo team][link:akveo-homepage]. Follow us on [Twitter][link:akveo-twitter] to get the latest news first!
We're always happy to receive your feedback!

[badge:travis]: https://travis-ci.com/akveo/kittenTricks.svg?branch=master
[badge:github-actions]: https://github.com/akveo/kittenTricks/workflows/Build/badge.svg

[link:travis]: https://travis-ci.com/akveo/kittenTricks
[link:github-actions]: https://github.com/akveo/kittenTricks/actions
[link:eva]: https://eva.design
[link:doc-ui-kitten]: https://akveo.github.io/react-native-ui-kitten
[link:ui-kitten]: https://github.com/akveo/react-native-ui-kitten
Expand Down
37 changes: 23 additions & 14 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{
"expo": {
"name": "Kitten Tricks",
"icon": "./src/assets/icons/icon.png",
"slug": "kitten-tricks",
"version": "2.0.1",
"slug": "kittenTricks",
"sdkVersion": "35.0.0",
"privacy": "public",
"orientation": "portrait",
"sdkVersion": "36.0.0",
"description": "UI Kitten Demo Application",
"githubUrl": "https://github.com/akveo/kittenTricks",
"ios": {
"bundleIdentifier": "com.akveo.kittentricks",
Expand All @@ -17,17 +15,28 @@
"versionCode": 17,
"playStoreUrl": "https://play.google.com/store/apps/details?id=com.akveo.kittenTricks"
},
"androidStatusBar": {
"backgroundColor": "#FFFFFF"
},
"assetBundlePatterns": [
"src/assets/images/source/*",
"src/assets/icons/**/*.png",
"src/assets/fonts"
"privacy": "public",
"platforms": [
"ios",
"android",
"web"
],
"orientation": "portrait",
"userInterfaceStyle": "automatic",
"icon": "./src/assets/images/image-app-icon.png",
"splash": {
"image": "src/assets/images/source/splash.png",
"image": "src/assets/images/image-splash.png",
"resizeMode": "contain"
}
},
"assetBundlePatterns": [
"src/assets/images/*",
"src/assets/fonts",
"src/scenes/**/assets/*"
],
"androidStatusBar": {
"barStyle": "dark-content",
"backgroundColor": "#F7F9FC"
},
"entryPoint": "node_modules/expo/AppEntry.js"
}
}
27 changes: 17 additions & 10 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
const path = require('path');
const Config = require('./config');
const env = require('./env');

// FIXME: Resolve `transform[stderr]: Could not resolve` command-line warnings.
// FIXME: Reproducible when starting with clearing cache (npm start -- -c)
//
// TODO: Framework path aliasing even not needed here. Replace?
// TODO: Replace nested package.json-s with aliases
const frameworkAlias = {
'@eva-design/dss': path.resolve(env.EVA_PACKAGES_PATH, 'dss'),
'@eva-design/eva': path.resolve(env.EVA_PACKAGES_PATH, 'eva'),
'@eva-design/processor': path.resolve(env.EVA_PACKAGES_PATH, 'processor'),
'@ui-kitten/components': path.resolve(env.UI_KITTEN_PACKAGES_PATH, 'components'),
'@ui-kitten/date-fns': path.resolve(env.UI_KITTEN_PACKAGES_PATH, 'date-fns'),
'@ui-kitten/eva-icons': path.resolve(env.UI_KITTEN_PACKAGES_PATH, 'eva-icons'),
'@ui-kitten/moment': path.resolve(env.UI_KITTEN_PACKAGES_PATH, 'moment'),
};

const frameworkInternalAlias = {
'@kitten/theme': path.resolve(env.UI_KITTEN_PACKAGES_PATH, 'components/theme'),
'@kitten/ui': path.resolve(env.UI_KITTEN_PACKAGES_PATH, 'components/ui'),
};

const moduleResolverConfig = {
root: path.resolve('./'),
alias: {
'@kitten/theme': path.resolve(Config.KITTEN_PATH, 'theme'),
'@kitten/ui': path.resolve(Config.KITTEN_PATH, 'ui'),
'@eva-design/eva': path.resolve(Config.MAPPING_PATH),
'@eva-design/processor': path.resolve(Config.PROCESSOR_PATH),
...frameworkAlias,
...frameworkInternalAlias,
},
};

Expand Down
8 changes: 0 additions & 8 deletions config/dev.env.js

This file was deleted.

Loading