Skip to content

Commit

Permalink
Makefileを除去、Rename embed.ts to instruct.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
yuiseki committed Jan 13, 2024
1 parent 85b3287 commit f5050be
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 27 deletions.
16 changes: 0 additions & 16 deletions Makefile

This file was deleted.

9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

- Node.js がインストールされていることが前提です
- npm がインストールされていることも前提です
- Makefile を実行することができることも前提です
- 以下のコマンドを実行してください

```bash
Expand All @@ -39,19 +38,19 @@ npm run dev
- `npm run dev` は実行したままの状態で、以下のようなコマンドを実行してください

```bash
make style input=国の背景を青色で表示してください
npm run instruct -- 国の名前を黄色で表示して
```

- ブラウザで `http://localhost:5173/` にアクセスしてください
- 国が青色で地図が表示されていることを確認してください
- 国の名前が黄色になった地図が表示されていることを確認してください
- 以下のようなコマンドを実行してください

```bash
make style input=国の背景を黄色で表示してください
npm run instruct -- 国の名前を青色で表示して
```

- ブラウザで `http://localhost:5173/` にアクセスしてください
- 国が黄色で地図が表示されていることを確認してください
- 国の名前が青色に変化した地図が表示されていることを確認してください

## charites-ai の仕組み

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite --host",
"dev": "npm run watch-style & vite --host",
"build": "tsc && vite build",
"build-style": "npx charites build styles/charites-ai/style.yml public/style.json",
"watch-style": "npx charites build -w styles/charites-ai/style.yml public/style.json",
"lint": "tsc && eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"embed": "node --loader ts-node/esm ./scripts/embed.ts",
"instruct": "node --loader ts-node/esm ./scripts/instruct.ts",
"agent": "node --loader ts-node/esm ./scripts/agent.ts"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion public/style.json
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@
"visibility": "visible"
},
"paint": {
"text-color": "#333333",
"text-color": "#FF0000",
"text-halo-blur": 1,
"text-halo-color": "rgba(255,255,255,0.8)",
"text-halo-width": 2
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions styles/charites-ai/layers/place-country-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# - place-country-2.yml
#
# Concise instructions of this style in a few words:
# - Show the names of countries in black color.
# - Show the names of countries in red color.
#
# Description of this style:
# - This style is used to render the names of countries on the map.
Expand All @@ -20,7 +20,7 @@
# - The text labels are rendered with a text size of 11 pixels at zoom level 1.
# - The text labels are rendered with a text size of 17 pixels at zoom level 4.
# - The text labels are rendered with a text transform of uppercase.
# - The text labels are rendered with a text color of #333333. (Dark gray color)
# - The text labels are rendered with a text color of #FF0000. (Red color)
# - The text labels are rendered with a text halo blur of 1.
# - The text labels are rendered with a text halo color of rgba(255,255,255,0.8). (White color)
# - The text labels are rendered with a text halo width of 2.
Expand Down Expand Up @@ -51,7 +51,7 @@ layout:
text-transform: uppercase
visibility: visible
paint:
text-color: '#333333'
text-color: '#FF0000'
text-halo-blur: 1
text-halo-color: rgba(255,255,255,0.8)
text-halo-width: 2

0 comments on commit f5050be

Please sign in to comment.