Skip to content

Commit

Permalink
start with electron-react-boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlobu committed Aug 8, 2020
0 parents commit a30fa88
Show file tree
Hide file tree
Showing 122 changed files with 40,858 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
.eslintcache

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules

# OSX
.DS_Store

# App packaged
release
app/main.prod.js
app/main.prod.js.map
app/renderer.prod.js
app/renderer.prod.js.map
app/style.css
app/style.css.map
dist
dll
main.js
main.js.map

.idea
npm-debug.log.*
.*.dockerfile
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
56 changes: 56 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
.eslintcache

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules

# OSX
.DS_Store

# App packaged
release
app/*.main.prod.js
app/main.prod.js
app/main.prod.js.map
app/renderer.prod.js
app/renderer.prod.js.map
app/style.css
app/style.css.map
dist
dll
main.js
main.js.map

.idea
npm-debug.log.*
__snapshots__

# Package.json
package.json
.travis.yml
*.css.d.ts
*.sass.d.ts
*.scss.d.ts
26 changes: 26 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module.exports = {
extends: 'erb/typescript',
rules: {
// A temporary hack related to IDE not resolving correct package.json
'import/no-extraneous-dependencies': 'off',
},
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
project: './tsconfig.json',
tsconfigRootDir: __dirname,
createDefaultProgram: true,
},
settings: {
'import/resolver': {
// See https://github.com/benmosher/eslint-plugin-import/issues/1396#issuecomment-575727774 for line below
node: {},
webpack: {
config: require.resolve('./configs/webpack.config.eslint.js'),
},
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
},
};
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
* text eol=lf
*.png binary
*.jpg binary
*.jpeg binary
*.ico binary
*.icns binary
7 changes: 7 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# TODO: edit funding when ready

# These are supported funding model platforms

github: [deskrin, pavlobu]
patreon: pavlobu
open_collective: todo-add-open-collective-page!
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/1-Bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Bug report
about: You're having technical issues. 🐞
labels: 'bug'
---

<!-- Please use the following issue template or your issue will be closed -->

## TODO

write bug report template
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/2-Question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: Question
about: Ask a question.❓
labels: 'question'
---

## TODO

write question template
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/3-Feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
name: Feature request
about: You want something added to the boilerplate. 🎉
labels: 'enhancement'
---
6 changes: 6 additions & 0 deletions .github/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
requiredHeaders:
- Prerequisites
- Expected Behavior
- Current Behavior
- Possible Solution
- Your Environment
17 changes: 17 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pr
- discussion
- e2e
- enhancement
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
41 changes: 41 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: codecov generate
on: [push, pull_request]
jobs:
run:
runs-on: ubuntu-18.04

steps:
- name: Check out Git repository
uses: actions/[email protected]

- name: Install Node.js, NPM and Yarn
uses: actions/[email protected]
with:
node-version: 14
- name: yarn install
run: |
yarn install --frozen-lockfile
- name: yarn build
uses: borales/[email protected]
with:
cmd: build

- name: yarn test
uses: borales/[email protected]
with:
cmd: test

- name: yarn coverage
uses: borales/[email protected]
with:
cmd: coverage

- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/clover.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
65 changes: 65 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

name: release all os -- no code signing

jobs:
create-release:
runs-on: ubuntu-18.04
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

release:
name: Release
runs-on: ${{ matrix.os }}

strategy:
matrix:
include:
- os: ubuntu-18.04
artifact_name: 'release/{*.AppImage,*.rpm,*.deb,*.yml}'
- os: windows-2019
artifact_name: 'release/{*.msi,*.exe,*.blockmap,*.yml}'
- os: macos-10.14
artifact_name: 'release/{*.zip,*.dmg,*.blockmap,*.yml}'

steps:
- name: Checkout code
uses: actions/[email protected]

- name: Install Node.js, NPM and Yarn
uses: actions/[email protected]
with:
node-version: 14

- name: yarn install --frozen-lockfile
run: |
yarn install --frozen-lockfile
- name: yarn package-ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn package-ci

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: ${{ matrix.artifact_name }}
overwrite: true
file_glob: true
62 changes: 62 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: build and test

on: [push, pull_request]

jobs:
build-and-test:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [macos-10.14, windows-2019, ubuntu-18.04]

steps:
- name: Check out Git repository
uses: actions/[email protected]

- name: Install Node.js, NPM and Yarn
uses: actions/[email protected]
with:
node-version: 14

- name: yarn install --frozen-lockfile
run: |
yarn install --frozen-lockfile
# following step does code signing when `electron-builder --publish always` (look in package.json)
- name: yarn package-ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn package-ci

- name: yarn build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn build

- name: yarn lint
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn lint

- name: yarn tsc
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn tsc

- name: yarn test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn test

- name: yarn build-e2e
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn build-e2e

- name: yarn test-e2e
uses: GabrielBB/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
run: yarn test-e2e
Loading

0 comments on commit a30fa88

Please sign in to comment.