Skip to content

Commit

Permalink
Merge remote-tracking branch 'o/next' into pr/roffelund/3215
Browse files Browse the repository at this point in the history
  • Loading branch information
arpitBhalla committed Jan 14, 2022
2 parents e496908 + ea0ed51 commit 8e9adb5
Show file tree
Hide file tree
Showing 634 changed files with 47,418 additions and 7,813 deletions.
55 changes: 29 additions & 26 deletions .github/workflows/dist.yml
@@ -1,46 +1,49 @@
name: Build and Deploy next version
name: Bleeding Edge version
on:
push:
branches:
- next
- "next"
paths-ignore:
- 'website/**'
- "website/**"
- "example/**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Build dist
- name: Git checkout
uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Setup Node.js Env
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Cache Dependencies
node-version: "14"
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache dependencies
uses: actions/cache@v2
id: rne-dists-deploy
with:
path: node_modules
key: ${{ runner.os }}-rne-dists-deploy-${{ hashFiles('**/yarn.lock') }}
- name: Install
if: steps.rne-dists-deploy.outputs.cache-hit != 'true' # Over here!
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-dist-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-dist-
- name: Install Dependencies
run: yarn
- name: Build
- name: Build packages
run: yarn build
- name: Config git
run: |
git config --local user.email "react-native-elements-ci@users.noreply.github.com"
git config --local user.name "React Native Elements CI"
- name: Create local changes
run: |
sed -i -e '/dist/d' .gitignore
sed -i -e 's/dist/src/g' .gitignore
echo "tsconfig.json" >> .gitignore
echo "*.config.json" >> .gitignore
git add .
- name: Commit files
git commit -m "Bleeding Edge Version" -a
- name: Deploy Bleeding Edge version'@react-native-elements/*' packages
run: |
git config --local user.email "react-native-elements-ci@users.noreply.github.com"
git config --local user.name "React Native Elements CI"
git commit -m "New build" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: dist
force: true
for pkg in $(find ./packages -mindepth 1 -maxdepth 1 -type d -printf '%f\n'); do
echo "Deploying @react-native-elements/$pkg"
git push origin `git subtree split --prefix packages/$pkg -b $pkg`:refs/heads/$pkg --force
done
26 changes: 14 additions & 12 deletions .github/workflows/docs.yml
Expand Up @@ -4,7 +4,8 @@ on:
branches:
- next
paths:
- 'website/**'
- "website/**"

jobs:
docs:
runs-on: ubuntu-latest
Expand All @@ -17,27 +18,28 @@ jobs:
- name: Setup Node.js Env
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Cache Dependencies
node-version: "14"
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache dependencies
uses: actions/cache@v2
id: rne-docs-deploy
with:
path: node_modules
key: ${{ runner.os }}-rne-docs-deploy-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-
- name: Install
if: steps.rne-docs-deploy.outputs.cache-hit != 'true' # Over here!
run: |
cd website
yarn
- name: Build 🔧
run: |
cd website
yarn build
yarn docs:build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/build
user_name: 'React Native Elements CI'
user_email: 'react-native-elements-ci@users.noreply.github.com'
user_name: "React Native Elements CI"
user_email: "react-native-elements-ci@users.noreply.github.com"
cname: reactnativeelements.com
54 changes: 54 additions & 0 deletions .github/workflows/expo.yml
@@ -0,0 +1,54 @@
name: Expo Preview
on:
pull_request:
branches:
- "next"
paths:
- "src/**"

jobs:
publish:
name: Install and publish Expo preview
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'react-native-elements/react-native-elements'}}
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: "14"
- name: Setup Expo
uses: expo/expo-github-action@v6
with:
expo-version: 5.x
username: ${{ secrets.EXPO_CLI_USERNAME }}
password: ${{ secrets.EXPO_CLI_PASSWORD }}
expo-cache: true

- name: Install dependencies & build PR
run: yarn && tsc

- name: Clone RNE-app & install dependencies
run: |
git clone https://github.com/react-native-elements/react-native-elements-app demo-app
cd demo-app
npm i
mv ../dist/ ./node_modules/react-native-elements/dist
- name: Publish Expo app
working-directory: demo-app
run: |
expo login -u ${{ secrets.EXPO_CLI_USERNAME }} -p ${{ secrets.EXPO_CLI_PASSWORD }}
expo publish --release-channel=pr-${{ github.event.number }}
- name: Get expo link
id: expo
run: echo "::set-output name=path::@flyingcircle/react-native-elements-app?release-channel=pr-${{ github.event.number }}"

- name: Comment on PR
uses: unsplash/comment-on-pr@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: The mobile version of example app from this branch is ready! You can [see it here](https://expo.dev/${{ steps.expo.outputs.path }})<br><br><a href="https://exp.host/${{ steps.expo.outputs.path }}"><img src="https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=exp://exp.host/${{ steps.expo.outputs.path }}" height="200px" width="200px"></a>.
17 changes: 10 additions & 7 deletions .github/workflows/test.yml
Expand Up @@ -12,20 +12,23 @@ jobs:
- name: Setup Node.js Env
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Cache Dependencies
node-version: "14"
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache dependencies
uses: actions/cache@v2
id: rne-tests
with:
path: node_modules
key: ${{ runner.os }}-tests-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-
- name: Install
if: steps.rne-tests.outputs.cache-hit != 'true' # Over here!
run: |
yarn global add codecov
yarn
- name: Testing
run: |
yarn lint
yarn build
yarn test:ci && npx codecov --disable=gcov
yarn test && npx codecov --disable=gcov
6 changes: 3 additions & 3 deletions .gitignore
@@ -1,3 +1,4 @@
dist/
node_modules
.DS_Store
*.log
Expand All @@ -7,9 +8,8 @@ jsconfig.json
.vscode/
.idea/
website/build
.idea/
package-lock.json
build
*.orig
dist/
.docgen/
.docgen/
.expo/*
43 changes: 28 additions & 15 deletions README.md
Expand Up @@ -9,20 +9,19 @@
</p>

<p align="center">
<a href="https://www.npmjs.com/package/react-native-elements"><img src="https://img.shields.io/npm/v/react-native-elements.svg"></a>
<a href="https://travis-ci.org/react-native-elements/react-native-elements"><img src="https://img.shields.io/travis/react-native-elements/react-native-elements/master.svg"></a>
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg"></a>
<a href="https://github.com/react-native-elements/react-native-elements"><img src="https://img.shields.io/github/stars/react-native-elements/react-native-elements"></a>
<a href="https://www.npmjs.com/package/react-native-elements"><img src="https://img.shields.io/npm/dm/react-native-elements.svg"></a>
<a href="https://react-native-elements-slack.herokuapp.com"><img src="https://react-native-elements-slack.herokuapp.com/badge.svg"></a>
<a href="https://www.npmjs.com/package/react-native-elements"><img src="https://img.shields.io/npm/dm/react-native-elements.svg"></a>
<a href="https://react-native-elements-slack.herokuapp.com"><img src="https://react-native-elements-slack.herokuapp.com/badge.svg"></a>
<a href="https://lerna.js.org/"><img src="https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg"></a>
</p>

<p align="center">
<a href="#backers"><img src="https://opencollective.com/react-native-elements/backers/badge.svg"></a>
<a href="#sponsors"><img src="https://opencollective.com/react-native-elements/sponsors/badge.svg"></a>
<a href="https://codecov.io/gh/react-native-elements/react-native-elements"><img src="https://codecov.io/gh/react-native-elements/react-native-elements/coverage.svg"></a>
<a href="https://github.com/prettier/prettier"><img src="https://img.shields.io/badge/styled_with-prettier-ff69b4.svg"></a>
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg"></a>


</p>

<br />
Expand All @@ -37,19 +36,29 @@ Follow
[these instructions](https://reactnativeelements.com/docs/)
to install React Native Elements!

### Versions

| Package | Version |
| ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **@react-native-elements/base** | [![badge](https://img.shields.io/npm/v/@react-native-elements/base.svg?style=flat-square)](https://www.npmjs.com/package/@react-native-elements/base) |
| **@react-native-elements/themed** | [![badge](https://img.shields.io/npm/v/@react-native-elements/themed.svg?style=flat-square)](https://www.npmjs.com/package/@react-native-elements/themed) |
| **@react-native-elements/universe** | [![badge](https://img.shields.io/npm/v/@react-native-elements/base.svg?style=flat-square)](https://www.npmjs.com/package/@react-native-elements/universe) |

### Usage

Start using the components or try it on Snack
[here](https://snack.expo.io/rJu6gJfBZ).

```js
import { Button } from 'react-native-elements';
import { Button } from '@react-native-elements/base';

<Button />;
const App = () => <Button title="Hello World!" />;
```

## Components included:

### Base

- [x] [Avatar](https://reactnativeelements.com/docs/avatar)
- [x] [Badge](https://reactnativeelements.com/docs/badge)
- [x] [BottomSheet](https://reactnativeelements.com/docs/bottomsheet)
Expand All @@ -76,12 +85,12 @@ import { Button } from 'react-native-elements';
- [x] [Switch](https://reactnativeelements.com/docs/switch)
- [x] [Tile](https://reactnativeelements.com/docs/tile)
- [x] [Tab](https://reactnativeelements.com/docs/tab)
- [x] [TabView](https://reactnativeelements.com/docs/tab#tabview)
- [x] [TabView](https://reactnativeelements.com/docs/tabview)
- [x] [Tooltip](https://reactnativeelements.com/docs/tooltip)

## [Universe Components](https://www.npmjs.com/package/react-native-elements-universe)
### Universe

- [x] [Circular Slider](https://reactnativeelements.com/docs/)
- [x] [Circular Slider](https://reactnativeelements.com/docs/circularslider)

## React Native Web support

Expand All @@ -95,9 +104,13 @@ Checkout the official
[React Native Elements App](https://expo.io/@flyingcircle/projects/react-native-elements-app)
on Expo which uses all of the React Native Elements components.

If you are looking to contribute to the React Native Elements App, click
[here](https://github.com/react-native-elements/react-native-elements-app) to
view the implementation & run the RNE expo app locally.
If you are looking to contribute to the React Native Elements App,
[here](https://github.com/react-native-elements/react-native-elements/tree/example) to
view the implementation & Use this command to start example app locally

```bash
yarn start:example
```

## Documentation

Expand All @@ -106,7 +119,7 @@ view the implementation & run the RNE expo app locally.
## Contributing

Interested in contributing to this repo? Check out our
[Contributing Guide](https://reactnativeelements.com/docs/contributing)
[Contributing Guide](https://reactnativeelements.com/docs/repo/contributing)
and submit a PR for a new feature/bug fix.

A big shoutout to all our contributors! You could be here too!
Expand Down
1 change: 1 addition & 0 deletions example/.eslintignore
@@ -0,0 +1 @@
web-build
12 changes: 12 additions & 0 deletions example/.eslintrc
@@ -0,0 +1,12 @@
{
"extends": "@react-native-community",
"rules": {
"react-native/no-inline-styles": 0,
"@typescript-eslint/no-unused-vars": [
"error",
{
"ignoreRestSiblings": true
}
]
}
}
15 changes: 15 additions & 0 deletions example/.gitignore
@@ -0,0 +1,15 @@
.idea
.vscode
.DS_Store
web-build/
web-report/

node_modules/*
dist/*
.expo/*
npm-debug.*
*.log

/beta

.expo-shared/
4 changes: 4 additions & 0 deletions example/.prettierignore
@@ -0,0 +1,4 @@
/node_modules
/.expo
/web
/*.json
6 changes: 6 additions & 0 deletions example/.prettierrc
@@ -0,0 +1,6 @@
{
"singleQuote": true,
"trailingComma": "es5",
"tabWidth": 2,
"semi": true
}
1 change: 1 addition & 0 deletions example/.watchmanconfig
@@ -0,0 +1 @@
{}

0 comments on commit 8e9adb5

Please sign in to comment.