5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 20:51:38 +08:00
wails/website
Oleg Gulevskyy ca8a1fab36
Ability to define prefix / suffix for TS module (#2101)
* add tspostfix and tsprefix flags + organise under struct

* postifx -> suffix

* tsPrefix options on bindings struct

* pass prefix and suffix to the executable

* add support for CLI flags for generating module

* method to set TSpref/suff to bindings

* use passed ts prefix for typescriptify

* add brief Readme udpate to include new flags

* create reusable common flags

* use common flags instead of hardcoded text

* support tsprefix & suffix for dev

* add tsPrefix & tsSuffix for build cmd

* take pref & suff in account when gen d.ts

* export colorsful log functions into utils for reuse

* detect and warn the user about usage of reserved keyword

* fmt

* add TrimSpace on fn input

* refactor utils -> logutils

* add bindings -> ts_generation options to wailsjson parse

* use wailsjson for ts generation

* update warning message + extract to func

* remove suff/pref info from readme

* update json schema

* add tests for prefix and suffix case

* rename suffix method

* Update v2/internal/typescriptify/typescriptify.go

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>

* Update website/static/schemas/config.v2.json

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>

* Update website/static/schemas/config.v2.json

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>

* update changelog

* Minor tweaks

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2022-11-24 21:33:58 +11:00
..
.vscode feat(website): repair document content (#1775) 2022-08-22 19:59:28 +10:00
blog Update blog 2022-09-22 11:27:40 +10:00
docs docs: update and sync documents (#2112) 2022-11-21 22:13:43 +11:00
i18n docs: fix and sync documents (#2119) 2022-11-22 18:34:04 +11:00
src Ability to define prefix / suffix for TS module (#2101) 2022-11-24 21:33:58 +11:00
static Ability to define prefix / suffix for TS module (#2101) 2022-11-24 21:33:58 +11:00
versioned_docs React Hash Router Links returns 404 (#2050) 2022-11-17 20:19:24 +11:00
versioned_sidebars Update docs and changelog 2022-11-09 22:26:22 +11:00
.gitignore [v2] Docs update 2021-09-27 19:37:58 +10:00
.npmrc Use swc + pnpm (#1966) 2022-10-13 21:22:57 +11:00
babel.config.js v2.0.0 2022-09-22 11:00:57 +10:00
crowdin.yml feat: optimize documentation website (#1849) 2022-09-18 22:01:50 +10:00
docusaurus.config.js feat(website): add translation progress (#2113) 2022-11-21 22:19:34 +11:00
package.json feat(website): add translation progress (#2113) 2022-11-21 22:19:34 +11:00
pnpm-lock.yaml feat(website): add translation progress (#2113) 2022-11-21 22:19:34 +11:00
README.md v2.0.0 2022-09-22 11:00:57 +10:00
sidebars.js fix(website): fix link (#1785) 2022-08-24 06:22:48 +10:00
versions.json Update docs and changelog 2022-11-09 22:26:22 +11:00

Website

This website is built using Docusaurus 2, a modern static website generator.

Installation

$ npm

Local Development

$ npm run start

Other languages:

npm run start -- --locale <language>

language - The language code configured in the i18n field in the docusaurus.config.js file.

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Translate

After the English source file is updated, run the following command to submit the source file to Crowdin:

npm run crowdin push -- -b <branch>

branch - Branch name in crowdin project

Run the following command to pull the translated files in crowdin to the local:

npm run crowdin pull -- -b <branch> -l <languageCode>

languageCode - Note that this refers to the language code in the crowdin project.

The recommended practice is to update the English source file locally, then translate the file in crowdin, and finally pull the translated file to the local.

Build

$ yarn build

This command generates static content into the build directory and can be served using any static contents hosting service.