Skip to content

Commit

Permalink
feat: new repo structure
Browse files Browse the repository at this point in the history
  • Loading branch information
IT-MikeS committed May 12, 2023
1 parent fb2f99c commit b0df017
Show file tree
Hide file tree
Showing 245 changed files with 3,107 additions and 44,419 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
node_modules
28 changes: 28 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'import'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier', 'plugin:import/typescript'],
rules: {
'no-constant-condition': 'off',
'@typescript-eslint/no-this-alias': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': ['error', { allowArgumentsExplicitlyTypedAsAny: true }],
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/consistent-type-assertions': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/prefer-for-of': 'error',
'@typescript-eslint/prefer-optional-chain': 'error',
'import/first': 'error',
'import/order': [
'error',
{
alphabetize: { order: 'asc', caseInsensitive: false },
groups: [['builtin', 'external'], 'parent', ['sibling', 'index']],
'newlines-between': 'always',
},
],
'import/newline-after-import': 'error',
'import/no-duplicates': 'error',
'import/no-mutable-exports': 'error',
},
};
1 change: 0 additions & 1 deletion .github/CODEOWNERS

This file was deleted.

8 changes: 0 additions & 8 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Expand Down
45 changes: 45 additions & 0 deletions .github/actions/setup-tools/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: 'Setup Tools'
description: 'Setup tools needed in repo'

inputs:
skip-install-on-cache-hit:
description: 'If a Cache Hit happens, skip pnpm install'
required: true
default: 'false'

runs:
using: 'composite'
steps:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install PNPM
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: 8
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_ENV
- name: Setup PNPM cache
id: cache-pnpm-store
uses: actions/cache@v3
env:
STORE_PATH: ${{ env.STORE_PATH }}
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
if: inputs.skip-install-on-cache-hit == 'false' || (inputs.skip-install-on-cache-hit == 'true' && steps.cache-pnpm-store.cache-hit == 'false')
shell: bash
run: pnpm install
8 changes: 0 additions & 8 deletions .github/bot.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/capacitor-community-bot.yml

This file was deleted.

44 changes: 29 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,56 @@ on:
branches:
- "main"
pull_request:
branches:
- "main"
types:
- 'synchronize'
- 'opened'

permissions: read-all

jobs:
setup:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.15.1
cache: 'npm'
- run: npm install
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- name: 'Setup Tools'
uses: ./.github/actions/setup-tools

lint:
needs: [setup]
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.15.1
cache: 'npm'
- run: npm install
- run: npm run lint
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- name: 'Setup Tools'
uses: ./.github/actions/setup-tools
with:
skip-install-on-cache-hit: 'true'
- name: 'Lint Package'
shell: bash
run: |
pnpm run lint
build:
needs: [setup, lint]
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.15.1
- run: npm install
- run: npm run build
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- name: 'Setup Tools'
uses: ./.github/actions/setup-tools
with:
skip-install-on-cache-hit: 'true'
- name: 'Lint Package'
shell: bash
run: |
pnpm run lint
21 changes: 0 additions & 21 deletions .github/workflows/needs-reply.yml

This file was deleted.

18 changes: 9 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.env
lerna-debug.log
node_modules
docs_old
.vscode
./.nx-cache
./cache
./nxcache
.DS_Store
.idea/
.cache/
build/
dist/
node_modules/
.DS_Store
.vscode/
npm-debug.log
template.tar.gz
File renamed without changes.
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist/**
node_modules/**
package.json
30 changes: 30 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports = {
printWidth: 120, // default: 80
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: true, // default: false
quoteProps: 'as-needed',
jsxSingleQuote: false,
trailingComma: 'es5',
bracketSpacing: true,
bracketSameLine: false,
arrowParens: 'always',
overrides: [
{
files: ['*.java'],
options: {
printWidth: 140,
tabWidth: 4,
useTabs: false,
trailingComma: 'none',
},
},
{
files: '*.md',
options: {
parser: 'mdx',
},
},
],
};
3 changes: 0 additions & 3 deletions CONTRIBUTING.md

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) Mike S.
Copyright (c) Mike Summerfeldt.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions platform/build-platform.js → build.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { join } = require('path');
const tar = require('tar');

async function packTemplate() {
const templateSrc = join('./', 'template');
const templateSrc = join('./', 'src', 'electron-platform-template');
const destTemplateFilePath = join('./', 'template.tar.gz');
const files = [];
readdirSync(templateSrc).forEach((file) => {
Expand All @@ -30,7 +30,7 @@ async function buildCliScrpts() {

async function buildPlatformCore() {
await esbuild.build({
entryPoints: ['src/electron/index.ts'],
entryPoints: ['src/electron-platform/index.ts'],
bundle: true,
outfile: 'dist/core/index.js',
platform: 'node',
Expand Down
20 changes: 0 additions & 20 deletions docs-site/.gitignore

This file was deleted.

33 changes: 0 additions & 33 deletions docs-site/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs-site/babel.config.js

This file was deleted.

10 changes: 0 additions & 10 deletions docs-site/blog/2021-10-10-welcome/index.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs-site/blog/authors.yml

This file was deleted.

Loading

0 comments on commit b0df017

Please sign in to comment.