-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #176 from dracor-org/162-vite
Migrate to vite
- Loading branch information
Showing
74 changed files
with
7,731 additions
and
11,588 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,4 +31,5 @@ public/data.json | |
public/wikidata.txt | ||
|
||
src/locales/*/*.js | ||
src/locales/*/*.ts | ||
src/locales/*/*.mo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
src/locations.json | ||
lingui.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"singleQuote": true, | ||
"jsxSingleQuote": false, | ||
"semi": true, | ||
"tabWidth": 2, | ||
"bracketSpacing": false, | ||
"arrowParens": "always", | ||
"trailingComma": "es5" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,13 +10,14 @@ This project was bootstrapped with [Create React App](https://github.com/faceboo | |
### Quick start | ||
|
||
After installing [nodejs](https://nodejs.org/en/download/package-manager/) and | ||
[yarn](https://classic.yarnpkg.com/en/docs/install) you can start the *Einakter* | ||
[yarn](https://classic.yarnpkg.com/en/docs/install) you can start the _Einakter_ | ||
database by running the following commands: | ||
|
||
```bash | ||
git clone [email protected]:dracor-org/einakter.git | ||
cd einakter | ||
yarn | ||
yarn compile | ||
yarn start | ||
``` | ||
|
||
|
@@ -25,7 +26,7 @@ In the project directory, you can run: | |
### `yarn start` | ||
|
||
Runs the app in the development mode.<br /> | ||
Open [http://localhost:3000](http://localhost:3000) to view it in the browser. | ||
Open [http://localhost:5173](http://localhost:5173) to view it in the browser. | ||
|
||
The page will reload if you make edits.<br /> | ||
You will also see any lint errors in the console. | ||
|
@@ -72,7 +73,7 @@ new location IDs in `data.yaml` and adds them to `src/locations.json`. | |
### `yarn extract` | ||
|
||
Extracts translatable text from Javascript code and updates `.po` files in | ||
the `src/locales` directory. | ||
the `src/locales` directory. | ||
|
||
### `yarn compile` | ||
|
||
|
@@ -83,7 +84,7 @@ for testing new translations in a development server without re-running | |
|
||
## Translations | ||
|
||
*Einakter* uses [LinguiJS](https://lingui.js.org) to provide a multi-lingual | ||
_Einakter_ uses [LinguiJS](https://lingui.js.org) to provide a multi-lingual | ||
user interface. Translations are maintained in `.po` files in the | ||
[src/locales](src/locales). For updating translations the | ||
[yarn extract](#yarn-extract) and [yarn compile](#yarn-compile) commands can be | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import globals from 'globals'; | ||
import pluginJs from '@eslint/js'; | ||
import tseslint from 'typescript-eslint'; | ||
import pluginReact from 'eslint-plugin-react'; | ||
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; | ||
|
||
export default [ | ||
{ files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] }, | ||
{ languageOptions: { globals: globals.browser } }, | ||
pluginJs.configs.recommended, | ||
...tseslint.configs.recommended, | ||
pluginReact.configs.flat['jsx-runtime'], | ||
eslintPluginPrettierRecommended, | ||
{ | ||
rules: { | ||
camelcase: 'warn', | ||
'no-console': 'warn', | ||
'spaced-comment': ['error', 'always'], | ||
}, | ||
ignores: ['src/vite-env.d.ts'], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<meta name="theme-color" content="#000000" /> | ||
<meta name="description" content="Database of German one-act plays" /> | ||
<!-- | ||
manifest.json provides metadata used when your web app is installed on a | ||
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ | ||
--> | ||
<link rel="manifest" href="/manifest.json" /> | ||
<title>Einakter</title> | ||
<link | ||
rel="stylesheet" | ||
href="https://unpkg.com/[email protected]/dist/leaflet.css" | ||
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A==" | ||
crossorigin="" | ||
/> | ||
</head> | ||
<body> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
<div id="root"></div> | ||
<script type="module" src="/src/index.tsx"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** @type {import('@lingui/conf').LinguiConfig} */ | ||
module.exports = { | ||
locales: [ | ||
'en', | ||
'de', | ||
'es', | ||
'fa', | ||
'fr', | ||
'ja', | ||
'ko', | ||
'ku', | ||
'ru', | ||
'uk', | ||
'zh', | ||
'jbo-tok', | ||
], | ||
sourceLocale: 'en', | ||
catalogs: [ | ||
{ | ||
path: '<rootDir>/src/locales/{locale}/messages', | ||
include: ['src'], | ||
}, | ||
], | ||
format: 'po', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.