Skip to content

Commit

Permalink
Start conversion to svelte 5.
Browse files Browse the repository at this point in the history
  • Loading branch information
feored committed Aug 11, 2024
1 parent e532096 commit 837ca74
Show file tree
Hide file tree
Showing 39 changed files with 9,067 additions and 5 deletions.
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
node_modules

# Output
.output
.vercel
/.svelte-kit
/build

# OS
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# create-svelte

Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).

## Creating a project

If you're seeing this, you've probably already done this step. Congrats!

```bash
# create a new project in the current directory
npm create svelte@latest

# create a new project in my-app
npm create svelte@latest my-app
```

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

## Building

To create a production version of your app:

```bash
npm run build
```

You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
33 changes: 33 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import js from '@eslint/js';
import ts from 'typescript-eslint';
import svelte from 'eslint-plugin-svelte';
import prettier from 'eslint-config-prettier';
import globals from 'globals';

/** @type {import('eslint').Linter.Config[]} */
export default [
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs['flat/recommended'],
prettier,
...svelte.configs['flat/prettier'],
{
languageOptions: {
globals: {
...globals.browser,
...globals.node
}
}
},
{
files: ['**/*.svelte'],
languageOptions: {
parserOptions: {
parser: ts.parser
}
}
},
{
ignores: ['build/', '.svelte-kit/', 'dist/']
}
];
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions data/itemtypes.json → old/data/itemtypes.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"Shields",
"Necromancer Shrunken Heads"
],
"Armors": [
"Body Armors",
],
"Helms": [
"Helms",
"Barbarian Helms",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions js/rw.js → old/js/rw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const RUNES = [
const RUNES: string[] = [
'El', 'Eld', 'Tir', 'Nef', 'Eth',
'Ith', 'Tal', 'Ral', 'Ort', 'Thul',
'Amn', 'Sol', 'Shael', 'Dol', 'Hel',
Expand All @@ -7,14 +7,14 @@ const RUNES = [
'Lo', 'Sur', 'Ber', 'Jah', 'Cham', 'Zod'
];

const GEM_Q = ['Chipped', 'Flawed', '', 'Flawless'];
const GEM_TYPE = ['Topaz', 'Amethyst', 'Sapphire', 'Ruby', 'Emerald', 'Diamond'];
const GEM_Q: string[] = ['Chipped', 'Flawed', '', 'Flawless'];
const GEM_TYPE: string[] = ['Topaz', 'Amethyst', 'Sapphire', 'Ruby', 'Emerald', 'Diamond'];

const UPG_COST = Array(9).fill("").concat(
const UPG_COST: string[] = Array(9).fill("").concat(
GEM_Q.flatMap(i => GEM_TYPE.map(j => `${i} ${j}`.trim()))
);

const RUNES_INDEX = Object.fromEntries(RUNES.map((rune, i) => [rune, i]));
const RUNES_INDEX :{ [key: string]: number }= Object.fromEntries(RUNES.map((rune, i) => [rune, i]));

var RUNE_DATA = [];
var RUNEWORDS = [];
Expand Down
File renamed without changes.
Loading

0 comments on commit 837ca74

Please sign in to comment.