Skip to content

Commit

Permalink
Add: アイコンジェネレーターを追加 (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenc-nanashi authored Nov 22, 2023
1 parent 571fd07 commit f413378
Show file tree
Hide file tree
Showing 8 changed files with 3,678 additions and 579 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
src/openapi/**/* linguist-generated=true
openapi.json linguist-generated=true
*.woff2 linguist-vendored=true
public/toolbarIcons.svg linguist-generated=true

* text=auto eol=lf
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ npm run cap:build:android -- \
npm run cap:build:ios
```

## アイコン生成

[matex](https://github.com/sevenc-nanashi/matex)を使ってアイコンを生成します。
`build/matexRecipes.yml` を編集した後に以下のコマンドを実行してください。

```bash
npm run generate-icons
```

---

以下は元リポジトリの README です。
Expand Down
2 changes: 2 additions & 0 deletions build/matexRecipes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
toolbarIcons.svg:
saveVoice: save + volume_up
9 changes: 7 additions & 2 deletions build/utils.mts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@ export const __filename = fileURLToPath(import.meta.url).replace(/\\/g, "/");
export const __dirname = path.dirname(__filename);

export function runCommand(filePath: string, ...args: string[]) {
console.log(`$ ${filePath} ${args.map((a) => JSON.stringify(a)).join(" ")}`);
const process = spawn(filePath, args, {
stdio: ["ignore", "inherit", "inherit"]
stdio: ["ignore", "inherit", "inherit"],
});
return new Promise<void>((resolve, reject) => {
process.on("exit", (code) => {
if (code !== 0) {
reject(
new Error(`Failed to run ${filePath} ${args.join(" ")} : ${code}`)
new Error(
`Failed to run ${filePath} ${args
.map((a) => JSON.stringify(a))
.join(" ")}`
)
);
} else {
resolve();
Expand Down
Loading

0 comments on commit f413378

Please sign in to comment.