Skip to content

Commit

Permalink
Merge pull request #9 from geolonia/7-partial-generation
Browse files Browse the repository at this point in the history
自治体を指定して生成できるようにする
  • Loading branch information
keichan34 authored Jan 9, 2025
2 parents 9ae5812 + 20cb171 commit 58c9164
Show file tree
Hide file tree
Showing 34 changed files with 2,818 additions and 914 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ cache
.envrc
*.0x
*.7z
/settings.json
explorer
geolonia-japanese-addresses-v2-*.tgz
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,20 @@ $ npm run run:03_make_rsdt # 住居表示住所API作成 (町字APIが先に作
$ npm run run:04_make_chiban # 地番住所API作成 (町字APIが先に作らないとエラーになります)
```

TARファイルに丸める場合は
#### APIビルド設定

```shell
VERSION="$(date -u '+%4Y%m%d%H%M%S')"
cd ./out
tar -cf "api-$VERSION.tar" ./api
zstd -T0 -19 -z "api-$VERSION.tar"
`settings.json` に設定を入れてください。内容は `src/lib/settings.ts` を参照してください。

例えば、出力を北海道にしぼりたい場合は下記のように設定してください。

```json
{
"lgCodes": ["^01"]
}
```

#### アーカイブファイル作成

`deploy/01a_create_archive.sh` を参照してください

### API の構成
Expand Down
26 changes: 26 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//@ts-check
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

export default tseslint.config(
eslint.configs.recommended,
tseslint.configs.recommended,
tseslint.configs.recommendedTypeChecked,
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
}
},
{
ignores: [
'cache',
'node_modules',
'dist',
'eslint.config.mjs',
// '**/*.test.ts',
],
}
);
Loading

0 comments on commit 58c9164

Please sign in to comment.