LoginSignup
0
0

More than 1 year has passed since last update.

TypeScriptを使うときのメモ

Posted at

kintone + TypeScriptの開発時にイチから作るときの手順をメモします。

TypeScriptでkintoneカスタマイズ開発をしてみよう

が確度の高い情報ですが、babelはもう使わないよなあというところで。

git init
npm init
npm i typescript ts-loader
npm i webpack webpack-cli
npm install -D @webpack-cli/generators
kintone-customize-uploader init

kintone-customize-uploader initは、
あらかじめnpm i -g @kintone/customize-uploaderしておく必要がある。
そのままだとPowerShellの実行ポリシーに引っかかる場合があるので
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned しておく必要もある。

customize-manifest.jsonは適度に修正。
TypeScriptでkintoneカスタマイズ開発をしてみよう
の記事を読んだらよいかと。

package.jsonにスクリプト追加

    "get-fields": "kintone-dts-gen --base-url https://****.cybozu.com/ -u %MY_KINTONE_ID% -p %MY_KINTONE_PASSWORD% --app-id xxx -o ./src/fields.d.ts"

フィールドが更新されたら npm run get-fields することとなる。

    "upload": "kintone-customize-uploader --base-url https://tasou.cybozu.com/ --username %MY_KINTONE_ID% --password %MY_KINTONE_PASSWORD% src/dest/customize-manifest.json"

カスタマイズをいれたいときは npm run upload する。あるいは npm run upload -- --watach する。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0