Skip to content

Commit

Permalink
Merge pull request #98 from nimblehq/release/2.3.0
Browse files Browse the repository at this point in the history
Release 2.3.0
  • Loading branch information
carryall authored Jul 4, 2022
2 parents 16b9ad6 + 2b7d87c commit 104adfd
Show file tree
Hide file tree
Showing 7 changed files with 135 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Team
# @carryall is the Team Lead and the others are team members
* @carryall @bterone @hanam1ni @hoangmirs @malparty @rosle @tyrro
* @carryall @bterone @hanam1ni @hoangmirs @malparty @rosle @tyrro @nihisil

# Engineering Leads
CODEOWNERS @nimblehq/engineering-leads
46 changes: 46 additions & 0 deletions .github/wiki/Home.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Features list

This template is based on top of the TypeScript version of [Create-React-App](https://create-react-app.dev/) toolkit and contains all its features.
In addition to Create-React-App, this template provides the following features:

## Development

### Project Structure

- A project structure matching our [React Project Strucutre](https://nimblehq.co/compass/development/code-conventions/javascript/react/#project-structure) conventions
- ESLint and Prettier — using our [custom ESLint configuration](https://github.com/nimblehq/eslint-config-nimble)
- SCSS support with our [conventional file structure](https://nimblehq.co/compass/development/code-conventions/css/#stylesheets-structure)
- Using `Dart SASS` with `@use` and `@forward` imports
- Absolute file imports

### Helpers & Tools

- [Axios](https://github.com/axios/axios) and a ready-to-use `requestManager` helper
- [Localization](https://github.com/nimblehq/react-templates/issues/34) using `i18next`
- [React Router](https://github.com/nimblehq/react-templates/issues/53)

## Testing

- [Cypress](https://nimblehq.co/compass/development/code-conventions/javascript/cypress/) confiugured for UI tests
- `data-test-id` [made consistent](https://github.com/nimblehq/react-templates/issues/30) across Cypress and Jest tests
- [Test coverage reports](https://github.com/nimblehq/react-templates/pull/38) — merging Cypress and Jest tests reports

## GitHub

- GitHub templates for Issues and Pull Requests
- GitHub workflows for Preview, Deployment and Tests

## GitLab

- GitLab templates for Merge Requests

# Recommended React Libraries

| Domain | ✅ This was great | 🚫 This was bad | 👀 This has not been tried, but it seems interesting! |
|---|---|---|---|
| HTML Form Handling | [React Hook Form](https://react-hook-form.com/) — Used in [Varuna](https://github.com/nimblehq/varun-web/) | | | |
| Store | [Redux](https://redux.js.org/) with the [Redux Toolkit](https://redux-toolkit.js.org/) — Used in [Varuna](https://github.com/nimblehq/varun-web/) | | | |
| UI Notifications | [React Hot Toast](https://react-hot-toast.com/) — Used in [Varuna](https://github.com/nimblehq/varun-web/) | | | |
| Calendar Component | [React Calendar](https://github.com/wojtekmaj/react-calendar) — Used in [Varuna](https://github.com/nimblehq/varun-web/) | | | |
| Google Maps | [Google Map React](https://github.com/google-map-react/google-map-react) — Used in [Varuna](https://github.com/nimblehq/varun-web/) | | | |
| Input Mask | | [React Input Mask](https://github.com/sanniassin/react-input-mask) — Failed to use in Varuna project and no support provided, we ended up using the vanilla one: [Input Mask](https://github.com/RobinHerbots/Inputmask) | | |
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish package to npmjs

on:
release:
types:
- published

jobs:
publish:
name: Publish package

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "16"
cache: "npm"
registry-url: "https://registry.npmjs.org"

- name: Install dependencies
run: npm ci

- name: Publish package to npmjs
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
18 changes: 18 additions & 0 deletions .github/workflows/wiki.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Publish Wiki

on:
push:
branches:
- development
paths:
- .github/wiki/**

jobs:
publish:
name: Publish wiki
uses: nimblehq/github-actions-workflows/.github/workflows/[email protected]
with:
USER_NAME: github-wiki-action
USER_EMAIL: [email protected]
secrets:
USER_TOKEN: ${{ secrets.WIKI_ACTION_TOKEN }}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
</p>

Our template offers a rich boilerplate to jump-start React-based application development with [Create React App](https://github.com/facebook/create-react-app).
The complete list of features included in this template is available in [the Wiki](https://github.com/nimblehq/react-templates/wiki).

## Getting Started

Expand All @@ -24,11 +25,10 @@ Our template offers a rich boilerplate to jump-start React-based application dev

### Usage

To use this template, add `--template nimble` when creating a new app from the `create-react-app` command.

To use this template, add `--template @nimblehq` when creating a new app from the `create-react-app` command.

```sh
npx create-react-app my-app --template nimble
npx create-react-app my-app --template @nimblehq
```

For more information about `create-react-app`, please refer to:
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{
"name": "cra-template-nimble",
"version": "2.2.1",
"name": "@nimblehq/cra-template",
"version": "2.3.0",
"description": "The base template for Nimble React App.",
"author": "Nimble <[email protected]>",
"keywords": [
"react",
"create-react-app",
"template",
"typescript",
"nimble"
],
"description": "The base template for Nimble React App.",
"homepage": "https://github.com/nimblehq/react-templates",
"repository": {
"type": "git",
"url": "https://github.com/nimblehq/react-templates.git"
Expand Down
31 changes: 31 additions & 0 deletions template/.github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 'Netlify Preview Deploy'

on:
push:
branches-ignore: ['main', 'master']

jobs:
deploy:
name: 'Deploy'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

# Sets the branch name as environment variable
- uses: nelonoel/[email protected]
- uses: jsmrcaga/action-netlify-deploy@master
with:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
deploy_alias: ${{ env.BRANCH_NAME }}
install_command: yarn
build_command: yarn build

# Creates a status check with link to preview
- name: Status check
uses: Sibz/[email protected]
with:
authToken: ${{ secrets.GITHUB_TOKEN }}
context: Netlify preview
state: success
target_url: https://${{ env.BRANCH_NAME }}--my-site.netlify.app

0 comments on commit 104adfd

Please sign in to comment.