Skip to content

Commit

Permalink
chore: next release #23
Browse files Browse the repository at this point in the history
  • Loading branch information
damienbutt authored Apr 12, 2022
2 parents 2212ba2 + e7d445b commit 1c60f70
Show file tree
Hide file tree
Showing 39 changed files with 1,412 additions and 409 deletions.
2 changes: 1 addition & 1 deletion .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": ["@commitlint/config-conventional"]
"extends": ["@commitlint/config-conventional"]
}
6 changes: 5 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ root = true
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = tab
indent_style = space
indent_size = tab
tab_width = 4
trim_trailing_whitespace = true

[*.md]

trim_trailing_whitespace = false

[*.{yml,yaml}]

tab_width = 2
75 changes: 37 additions & 38 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish

on:
push:
branches: [ master ]
branches: [master]

jobs:
quality:
Expand All @@ -14,47 +14,46 @@ jobs:
os: [ubuntu-latest, macOS-latest, windows-latest]

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn

- name: Build
run: yarn build
- name: Run tests
run: yarn test
- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: yarn

- name: Build
run: yarn build

- name: Run tests
run: yarn test

publish:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/master' }}

needs: [quality]

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

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: yarn

- name: Build
run: yarn build

- name: Release
run: yarn semantic-release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: yarn

- name: Build
run: yarn build

- name: Release
run: yarn semantic-release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
access=public
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build/*
dist/*
node_modules/*
.history/*
5 changes: 3 additions & 2 deletions template/.prettierrc → .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"printWidth": 80,
"semi": true,
"singleQuote": false,
"tabWidth": 4,
"useTabs": true
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "always"
}
3 changes: 3 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"branches": ["master"]
}
36 changes: 18 additions & 18 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"typescript.validate.enable": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"files.trimTrailingWhitespace": true,
"[markdown]": {
"files.trimTrailingWhitespace": false
},
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.history": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/*.js.map": true,
"node_modules": true
}
"typescript.validate.enable": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"files.trimTrailingWhitespace": true,
"[markdown]": {
"files.trimTrailingWhitespace": false
},
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.history": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/*.js.map": true,
"node_modules": true
}
}
48 changes: 36 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ This is an unofficial third party TypeScript template for [Create React App](htt

The template is setup to work with Crestron CH5 out of the box so you can get up and running quickly. It also provides packages for page routing, styling using [CSS-in-JS](https://en.wikipedia.org/wiki/CSS-in-JS) (you can still use regular CSS or SCSS 😄), a wide variety of icons, mobile browser console, linting and more... 🚀 🚀 🚀

**NOTE**

To use the Husky Git Hooks feature provided by this template you must manually run the following command within the project directory after the bootstrap completes.

```sh
npm run husky:install

# or

yarn husky:install
```

To use this template, add `--template @norgate-av/crestron-ch5-typescript` when creating a new app.

For example:
Expand All @@ -26,16 +38,23 @@ yarn create react-app my-app --template @norgate-av/crestron-ch5-typescript
- [Crestron CH5 CrComLib](https://www.npmjs.com/package/@crestron/ch5-crcomlib)
- [Crestron CH5 WebXPanel](https://www.npmjs.com/package/@crestron/ch5-webxpanel)
- [Crestron CH5 CLI](https://www.npmjs.com/package/@crestron/ch5-utilities-cli)
- [Crestron CH5 Helper](https://www.npmjs.com/package/@norgate-av/crestron-ch5-helper)
- [Typescript](https://www.typescriptlang.org/)
- [React Router](https://reactrouterdotcom.fly.dev/)
- [Redux](https://redux.js.org/)
- [React Redux](https://react-redux.js.org/)
- [Redux Toolkit](https://redux-toolkit.js.org/)
- [Styled Components](https://styled-components.com/)
- [React Icons](https://react-icons.github.io/react-icons/)
- [Rooks](https://react-hooks.org/)
- [Eruda](https://eruda.liriliri.io/)
- [Axios](https://axios-http.com/)
- [ESLint](https://eslint.org/)
- [Prettier](https://prettier.io/)
- [Husky](https://typicode.github.io/husky/#/)
- [Lint-Staged](https://github.com/okonet/lint-staged)
- [Commitizen](https://commitizen-tools.github.io/commitizen/)
- [commitlint](https://commitlint.js.org/#/)
- [VSCode Workspace Config](https://code.visualstudio.com/docs/getstarted/settings#_workspace-settings)
- [EditorConfig](https://editorconfig.org/)

Expand All @@ -45,18 +64,23 @@ To upload to a Crestron touchscreen or control system, you must add the IP addre

```json
{
"crestron": {
"project": {
"touchscreen": {
"url": "Enter IP/Hostname of Crestron Touchpanel here...",
"type": "touchscreen"
},
"web": {
"url": "Enter IP/Hostname of Crestron Processor here...",
"type": "web"
}
}
}
"crestron": {
"project": {
"touchscreen": {
"url": "Enter IP/Hostname of Crestron Touchpanel here...",
"type": "touchscreen"
},
"web": {
"url": "Enter IP/Hostname of Crestron Processor here...",
"type": "web",
"config": {
"host": "localhost",
"ipId": "0x03",
"roomId": ""
}
}
}
}
}
```

Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,20 @@
"template.json"
],
"scripts": {
"semantic-release": "semantic-release --branches master",
"semantic-release": "semantic-release",
"commit": "git-cz",
"build": "echo \"Build is not configured for package \\\"$npm_package_name\\\", skipping.\"",
"test": "echo \"Unit testing is not configured for package \\\"$npm_package_name\\\", skipping.\"",
"prepare": "husky install"
"prepare": "husky install",
"pretty:fix": "prettier --write ."
},
"devDependencies": {
"@commitlint/cli": "^16.2.3",
"@commitlint/config-conventional": "^16.2.1",
"cz-conventional-changelog": "3.3.0",
"semantic-release": "^19.0.2",
"husky": "^7.0.0"
"husky": "^7.0.0",
"prettier": "^2.6.2",
"semantic-release": "^19.0.2"
},
"config": {
"commitizen": {
Expand Down
Loading

0 comments on commit 1c60f70

Please sign in to comment.