Skip to content

Commit

Permalink
merge codex 2.0.0-beta.0 (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcv8000 authored Aug 3, 2023
1 parent d6bd23d commit a809c06
Show file tree
Hide file tree
Showing 136 changed files with 14,852 additions and 15,419 deletions.
38 changes: 38 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"env": {
"browser": true,
"es2022": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react", "@typescript-eslint", "react-refresh"],
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-empty-function": "off",
"react-refresh/only-export-components": "warn",
"react/function-component-definition": [
"warn",
{ "namedComponents": "function-declaration" }
],
"react/react-in-jsx-scope": "off",
"react/jsx-no-literals": ["warn", { "allowedStrings": ["""] }],
"@typescript-eslint/no-unused-vars": "warn"
},
"settings": {
"react": {
"version": "detect"
}
}
}
40 changes: 40 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Contributing a new Translation/Language to Codex

All translations for the app interface are defined in [packages/common/Locales.ts](../packages/common/Locales.ts)

If you want to contribute your own translation/language, first fork the repository, and then edit `packages/common/Locales.ts`.

The first object in the file is a `Locale` type which defines all of the text variables used in the app. You don't need to change this at all.

You will need to add the locale name of your translation to `SupportedLocales`. For example if you were adding Spanish (Mexico) you would add ` | "es_MX";` to the end of the line:

```ts
export type SupportedLocales = "en_US";
```

to

```ts
export type SupportedLocales = "en_US" | "es_MX";
```

Then, the last object in the file is `export const locales`. Select the entire `en_US: { ... }` object and copy/paste it below:

```ts
export const locales: Record<SupportedLocales, Locale> = {
en_US: { ... }
};
```

to

```ts
export const locales: Record<SupportedLocales, Locale> = {
en_US: { ... },
es_MX: { ... }
};
```

Then you can go through the new object and change the strings to your own translation.

Finally, create a pull request on the original repository with your new changes.
12 changes: 0 additions & 12 deletions .github/FUNDING.yml

This file was deleted.

131 changes: 85 additions & 46 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,90 @@
name: build

on:
workflow_dispatch:
workflow_dispatch:

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v2

- name: Install node
uses: actions/setup-node@v2
with:
node-version: 14

- name: Install packages
run: npm i

- name: Create Windows cert File
id: create_pfx
if: matrix.os == 'windows-latest'
uses: timheuer/base64-to-file@v1
with:
filename: certificate.pfx
encodedString: ${{ secrets.B6473 }}

- name: Run Electron Builder
run: npx electron-builder --publish=never
env:
CSC_LINK: ${{ steps.create_pfx.outputs.filePath }}
CSC_KEY_PASSWORD: ${{ secrets.P7834 }}

- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: binaries
path: |
dist
!dist/*.blockmap
!dist/*.yml
!dist/win-unpacked
!dist/linux-unpacked
!dist/.icon-set
!dist/mac
!dist/.cache
retention-days: 1
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Install node
uses: actions/setup-node@v3
with:
node-version: 16
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Create Windows cert File
id: create_pfx
if: matrix.os == 'windows-latest'
uses: timheuer/base64-to-file@v1
with:
filename: certificate.pfx
encodedString: ${{ secrets.B64 }}

- name: Create macOS cert File
id: create_p12
if: matrix.os == 'macos-latest'
uses: timheuer/base64-to-file@v1
with:
filename: cert.p12
encodedString: ${{ secrets.MAC_CERT }}

- name: Run Electron Builder (Windows)
if: matrix.os == 'windows-latest'
run: pnpm dist
env:
CSC_LINK: ${{ steps.create_pfx.outputs.filePath }}
CSC_KEY_PASSWORD: ${{ secrets.PASS }}

- name: Run Electron Builder (Linux)
if: matrix.os == 'ubuntu-latest'
run: pnpm dist

- name: Run Electron Builder (macOS)
if: matrix.os == 'macos-latest'
run: pnpm dist
env:
CSC_LINK: ${{ steps.create_p12.outputs.filePath }}
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERT_PASSWORD }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}

- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: binaries
path: |
dist/*.exe
!dist/win_unpacked/*
dist/*.zip
dist/*.deb
dist/*.tar.xz
dist/*.dmg
retention-days: 1

# - name: Release
# uses: softprops/action-gh-release@v1
# with:
# draft: true
# files: |
# dist/*.exe
# !dist/win_unpacked/*
# dist/*.zip
# dist/*.deb
# dist/*.tar.xz
# dist/*.dmg
22 changes: 19 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
node_modules/
dist/
.vs/
node_modules
packages/renderer/node_modules
.DS_Store
*.local

# build output
.vite
dist

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"tabWidth": 4,
"trailingComma": "none",
"printWidth": 100
}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
}
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"typescript.tsdk": "node_modules\\typescript\\lib",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"files.exclude": {
"**/node_modules": true,
"node_modules": true,
".vite": true
}
}
Loading

0 comments on commit a809c06

Please sign in to comment.