No description
Find a file
Neil 0dc057af8d
Bugfix new api (#674)
* add deps

* #673 show github page in metas

* #637 #671 select-language fixes

* bump
2023-06-20 11:48:40 +08:00
.github Fix notarization (#670) 2023-06-16 19:20:54 +08:00
devops #172 ci cache implementation: pnpm store and cargo build target 2023-01-25 14:58:19 +08:00
modules Bugfix new api (#674) 2023-06-20 11:48:40 +08:00
.gitignore I18n crowdin (#242) 2023-02-28 13:38:57 +08:00
.npmrc #186 init electron ci build 2023-02-02 11:01:12 +08:00
LICENSE.txt oops, add license 2023-05-10 06:57:12 -04:00
package.json i18n: translate using json file (#648) 2023-06-05 18:06:33 +08:00
pnpm-lock.yaml adopt to new api endpoints (#669) 2023-06-16 13:19:37 +08:00
pnpm-workspace.yaml #92 change /packages/ to /modules/ 2022-12-21 10:02:20 +08:00
README.md adopt to new api endpoints (#669) 2023-06-16 13:19:37 +08:00

screenshot

Twitter Discord Documentation & Manual

tea/gui is the graphical app complement to tea/cli.

Under the hood tea/gui installs and manages your packages with tea/cli while exposing additional functionality, features and informational touches that complement and expand upon the nature of package management.

To install the gui, visit: https://tea.xyz/gui/ and download the latest version. The gui auto-updates itself.

 

Contributing to tea/gui

If you have suggestions or ideas, start a discussion. If we agree, well move it to an issue. Bug fixes straight to pull request or issue please!

Anatomy

tea/gui is a Svelte Electon app. The electron “backend” can be found in modules/desktop, the Svelte “frontend” in modules/ui. The following technologies are used:

Hacking on tea/gui

xc setup  # only required once
xc build  # only required if you modify the backend
xc dev    # opens the app in dev mode

Make sure to run xc prettier before submitting pull-requests.

 

Internationalization / Translations

We need help translating our user interface into different languages. The translation related source code are all in ./modules/desktop/src/libs/translations/*.

To add a new language:

  1. Create a json file in ./modules/desktop/src/libs/translations/languages/[lang].json. Copy the contents of en.json then translate.
  2. Import the new language in ./modules/desktop/src/libs/translations/index.ts. More instructions are in that file.

Tasks

The following can be run with xc, eg. xc build.

Setup

Setup ensures that required configuration placeholder files are present and installs dependencies.

if [ ! -e modules/desktop/electron/config.json ]; then
  echo '{}' > modules/desktop/electron/config.json
fi

if [ ! -e modules/desktop/.env ]; then
  cp modules/desktop/.env.example modules/desktop/.env
fi

pnpm install
pnpm run -r prepare

Build

pnpm install
pnpm build:desktop

Build:lite

Builds a .app that is not codesigned or notarized. Ideal for local testing.

export CSC_IDENTITY_AUTO_DISCOVER=false
export MAC_BUILD_TARGET=dir
pnpm install
pnpm build:desktop

Dev

pnpm install
pnpm dev

Prettier

pnpm run --reporter append-only -r format

Dist

pnpm install
pnpm --filter tea exec pnpm predist
pnpm --filter tea exec pnpm dist

Check

Runs the typescript compiler and linter.

pnpm run -r check
pnpm run -r lint

e2e

Runs the webdriver.io end to end tests. Assumes that xc build has already been executed.

pnpm run --reporter append-only -r e2e

Bump

Inputs: PRIORITY

if ! git diff-index --quiet HEAD --; then
  echo "error: dirty working tree" >&2
  exit 1
fi

if [ "$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then
  echo "error: requires main branch" >&2
  exit 1
fi

V=$(node -p "require('./modules/desktop/package.json').version")
V=$(tea semverator bump $V $PRIORITY)

if ! grep -F "\"version\": \"$V\",$" modules/desktop/package.json; then
  sed -i.bak -e "s/\"version\": .*,$/\"version\": \"$V\",/" modules/desktop/package.json
  rm modules/desktop/package.json.bak
  git add modules/desktop/package.json
  git commit -m "bump $V" --gpg-sign
fi

git push origin main

Release

V="$(node -p "require('./modules/desktop/package.json').version")"
tea gh release create "v$V"

 

Dependencies

tea/cli will automagically make these available to your environment.

Project Version
nodejs.org =18.16.0
pnpm.io =7.33.1
xcfile.dev >=0.4.1
python.org ^3.11