Skip to content

Commit

Permalink
delete Flutter
Browse files Browse the repository at this point in the history
  • Loading branch information
narumincho committed Jun 22, 2024
1 parent 3e08a0c commit c993945
Show file tree
Hide file tree
Showing 61 changed files with 237 additions and 10,220 deletions.
4 changes: 0 additions & 4 deletions .fvmrc

This file was deleted.

39 changes: 0 additions & 39 deletions .metadata

This file was deleted.

9 changes: 1 addition & 8 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,13 @@
// "--watch", // ファイルの変更を監視して自動で再起動したかったが, なぜか動かない
"--inspect",
"--check",
"--unstable",
"--unstable-kv",
"--allow-net=:8000",
"--allow-read=local.sqlite*",
"--allow-write=local.sqlite*"
],
"program": "${workspaceFolder}/script/startInLocal.ts",
"attachSimplePort": 9229
},
{
"name": "start client",
"request": "launch",
"type": "dart",
"flutterMode": "debug",
"args": []
}
]
}
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@
"[markdown]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"dart.flutterSdkPath": ".fvm/versions/3.22.2"
}
16 changes: 1 addition & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ startDefinyServer();
```

```sh
deno run --check --watch --unstable --allow-net=:8000 ./script/startInLocal.ts
deno run --check --watch --unstable-kv --allow-net=:8000 ./script/startInLocal.ts
```

## client build
Expand All @@ -32,20 +32,6 @@ deno run --check --watch --unstable --allow-net=:8000 ./script/startInLocal.ts
deno run --check --allow-env --allow-net --allow-read --allow-write=./dist.json ./script/buildClient.ts
```

## client graphql codegen

### step 1 query gen

```sh
fvm flutter pub run ./lib/codegen.dart && fvm dart fix --apply && fvm dart format .
```

### step 2 api gen

```sh
fvm flutter pub run ./lib/codegen_api.dart && fvm dart fix --apply && fvm dart format .
```

## type check

```sh
Expand Down
63 changes: 0 additions & 63 deletions analysis_options.yaml

This file was deleted.

18 changes: 18 additions & 0 deletions client/main.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from "https://esm.sh/[email protected]";

export const App = () => {
const [count, setCount] = React.useState(0);

return (
<div>
<h1>definy</h1>
<button
onClick={() => {
setCount(count + 1);
}}
>
count: {count}
</button>
</div>
);
};
10 changes: 10 additions & 0 deletions client/start.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { createRoot } from "https://esm.sh/[email protected]/client";
import { App } from "./main.tsx";
import React from "https://esm.sh/v128/@types/[email protected]/index.d.ts";

const root = document.getElementById("root");
if (root === null) {
throw new Error("root element not found");
}

createRoot(root).render(<App />);
10 changes: 3 additions & 7 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@
"deno.unstable"
]
},
"fmt": {
"include": ["**"],
"exclude": ["build/**", ".dart_tool/**", ".fvm/**"]
},
"lint": {
"include": ["**"],
"exclude": ["build/**", ".dart_tool/**", ".fvm/**"]
"tasks": {
"server-dev": "deno run --check --watch --allow-env --allow-net --allow-read --allow-write=./dist.json ./script/startInLocal.ts",
"client-build": "deno run --check --allow-env --allow-net --allow-read --allow-write=./dist.json ./script/buildClient.ts"
}
}
Loading

0 comments on commit c993945

Please sign in to comment.