Skip to content

Commit

Permalink
build(all): fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
kherP committed Sep 8, 2021
2 parents 0ef8fec + 21bf196 commit 30e5979
Show file tree
Hide file tree
Showing 692 changed files with 82,941 additions and 50,860 deletions.
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '12', '14' ]
node: [ '15' ]
name: Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v2
Expand Down
110 changes: 102 additions & 8 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,120 @@ on:
branches: [master, beta]

jobs:
get_tags:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Get list of releases 📋
uses: octokit/[email protected]
id: get_latest_release
with:
route: GET /repos/kherp/react-components/tags
owner: octokit
repo: request-action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Convert list of releases to json and filter out versions less than minimum version 📝
id: set-matrix
run: |
arr=( $(echo $data | jq -r '.[].name') )
major=""
JSON="{\"include\":["
for i in "${arr[@]}"
do
if [ "$(printf '%s\n' "$minver" "$i" | sort -V | head -n1)" = "$minver" ]; then
if [ "$major" != "$(echo $i | cut -d. -f1)" ]; then
major=`echo $i | cut -d. -f1`
JSON="$JSON$(printf '{"name": "%s"}, ' "${i}")"
fi
fi
done
JSON="${JSON%,*} ${JSON##*,}"
JSON="$JSON]}"
echo "test: $JSON"
echo "::set-output name=matrix::$JSON"
env:
data: ${{steps.get_latest_release.outputs.data}}
minver: v4.0.0
gh_pages:
needs: get_tags
runs-on: ubuntu-latest

outputs:
matrix: ${{ needs.get_tags.outputs.matrix }}
path: ${{ steps.get_version_list.outputs.path }}
file: ${{ steps.get_version_list.outputs.file }}
steps:
- uses: actions/checkout@v2

- name: Setup Node
- name: Setup Node 🏗️
uses: actions/setup-node@v2
with:
node-version: 14.x
node-version: 15.x

- name: Installing dependencies
- name: Installing dependencies
run: npm ci

- name: Building docs
- name: Generating versions list
id: get_version_list
run: |
echo "$data" > $jsonPath$jsonFileName
echo "::set-output name=path::$jsonPath"
echo "::set-output name=file::$jsonFileName"
env:
data: ${{needs.get_tags.outputs.matrix}}
jsonPath: ./docs/src/assets/jsons/
jsonFileName: versions.json
- name: Building docs 🔨
run: npm run build:docs

- name: Publish
- name: Publish 🚀
uses: crazy-max/[email protected]
with:
build_dir: docs/public
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
build_docs:
needs: gh_pages
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix: ${{fromJson(needs.gh_pages.outputs.matrix)}}
steps:
- uses: actions/checkout@v2
with:
ref: ${{ matrix.name }}
- name: Setup Node 🏗️
uses: actions/setup-node@v2
with:
node-version: 15.x
- name: Installing dependencies ⏳
run: npm ci
- name: Building docs 🔨
id: get_doc_folder
run: |
if [ "$(printf '%s\n' "$requiredver" "$currentver" | sort -V | head -n1)" = "$requiredver" ]; then
echo "base=\"/react-components/${currentver}\"" >> .env
mkdir -p $jsonPath && touch $jsonPath$jsonFile
echo "$data" > $jsonPath$jsonFile
npm run build:docs
echo "::set-output name=doc_folder::docs/public"
else
npm run docs
echo "::set-output name=doc_folder::docs"
fi
env:
requiredver: v5.0.0 # oldest version where gatsby is implemented
data: ${{needs.gh_pages.outputs.matrix}}
jsonPath: ${{ needs.gh_pages.outputs.path }}
jsonFile: ${{ needs.gh_pages.outputs.file }}
currentver: ${{ matrix.name }}
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: ${{steps.get_doc_folder.outputs.doc_folder}} # The folder the action should deploy.
TARGET_FOLDER: ${{ matrix.name }}
CLEAN: true # Automatically remove deleted files from the deploy branch
CLEAN_EXCLUDE: '["version"]'

13 changes: 0 additions & 13 deletions .github/workflows/greetings.yml

This file was deleted.

6 changes: 4 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 14.x
node-version: 15.x

- name: Installing dependencies
run: npm ci
Expand All @@ -40,5 +40,7 @@ jobs:
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lib/coverage/lcov.info
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}

8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ npm-debug.log
.idea/

# VS Code - everything but the prettier config files
.vscode/*
!.vscode/extensions.json
!.vscode/settings.json
.vscode/
.history/

# Windows
Expand All @@ -23,4 +21,6 @@ dist
tmp
build
coverage
docs
public

.cache
38 changes: 0 additions & 38 deletions .npmignore

This file was deleted.

20 changes: 13 additions & 7 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# Files
*.md
*.yml
__mocks__
coverage
node_modules
dist
.github
.vscode
package.json
package-lock.json
package-lock.json

# Directories
.github/
.vscode/
test/
coverage/
node_modules/
dist/
docs/public/
docs/static/

3 changes: 0 additions & 3 deletions .vscode/extensions.json

This file was deleted.

7 changes: 0 additions & 7 deletions .vscode/settings.json

This file was deleted.

Empty file added CHANGELOG.md
Empty file.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SEB React Components

[![https://img.shields.io/npm/v/@sebgroup/react-components](https://img.shields.io/npm/v/@sebgroup/react-components)](https://www.npmjs.com/package/@sebgroup/react-components)
![Deployment](https://github.com/sebgroup/react-components/workflows/Deployment/badge.svg)
![Github Pages](https://github.com/sebgroup/react-components/workflows/Github%20Pages/badge.svg)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
Expand All @@ -18,9 +19,9 @@ This is a set of react components some of which are based on SEB's bootstrap. Th

This version of components has been developed with:

- React `^16.12`
- Typescript `^3.7`
- SEB Bootstrap `^5.1`
- React
- Typescript
- SEB Bootstrap

## Installation

Expand All @@ -43,7 +44,7 @@ For `Visual Studio Code` users, please install the [recommended plugins](.vscode

## Development

This project uses `prettier` for a more consistent (less annoying) coding. We are using 4 different builds for this project. The `src` folder is where the actual components exist with all their necessary dependencies. and `develop` folder is where we develop and test those components. Unit tests are based on `jest` and `enzyme`.
This project uses `prettier` for a more consistent (less annoying) coding. We are using 4 different builds for this project. The `src` folder is where the actual components exist with all their necessary dependencies. and `develop` folder is where we develop and test those components.

1. Development: `npm start`
2. Check formatting rules, Compile components and Create Docs folder: `npm run build`
Expand All @@ -57,19 +58,19 @@ This project uses `prettier` for a more consistent (less annoying) coding. We ar
For performance benefits we are not combining all the components into single Index rather they are chunked into their subpackage. Therefore, to use a component, you need to import the `Component` submodule from the `dist` folder, in whichever Class you want to use it. Here is a sample of how to import a `Button` component in a page.

```javascript
import { Button } from "@sebgroup/react-components/dist/Button";
import { Button } from "@sebgroup/react-components";

const Comp = () => {
const Component = () => {
const onClick = (e) => {
console.log("Im Clicked");
}

return (
<div>
<Button label="a button" onClick={onClick} />
<Button onClick={onClick}>Button label</Button>
</div>
);
}

export default Comp;
export default Component;
```
1 change: 0 additions & 1 deletion __mocks__/styleMock.js

This file was deleted.

49 changes: 0 additions & 49 deletions develop/__utils/makeData.tsx

This file was deleted.

10 changes: 0 additions & 10 deletions develop/__utils/queryString.ts

This file was deleted.

Loading

0 comments on commit 30e5979

Please sign in to comment.