1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

kintone 開発環境構築メモ 2023

Posted at

久しぶりに、PC を新しくしたので開発環境の設定をメモしておきます。
前回の開発環境構築メモを見ながら設定を進めました。

概要

開発で使っているツールがバージョンアップしていて、少し変更が必要なところもあった。
ただプラグインを開発する手順としては、大きな変化はない。
プラグインを kintone 環境にアップロードする REST API がまだ無いので、アップロードする処理は不安定なままです。

Surface Laptop 6 を待ちたかったんだが、なかなかでないのと、5 が少し安くなったので購入しました。
US キーボードが欲しいので、US Amazon から購入でした。約12日で届きました。
新製品発売直後は、上位機種の輸出ができないようなのですが、1年たって購入可能になっています。
前期種はメモリ8GB で、かなりひっ迫していたので、16GB はうれしい。

PC セットアップ

  • PC: Surface Laptop 5
    • ディスプレイ: 13.5
    • CPU: 12th Gen Intel(R) Core(TM) i7-1265U
    • メモリ: 16GB
    • SSD: 512GB
    • OS: Windows 11 Pro
  • MSアカウントで、移行
    • Onedrive から移行されたようです。
  • 日本語化

kintone 開発環境

ブラウザーやエディターなど

  • Chrome, Sfari などをインストール
  • git for windows version 2.43.0.windows.1
  • PowerShell 7.4.0
  • nodist 0.10.3
  • VSCode
    • Japanese Language Pack for Visual Studio Code
    • Minify
PowerShell\Microsoft.PowerShell_profile.ps1.js
# プロンプトの表示をカレントディレクトリだけにする
function prompt {
    $origLastExitCode = $LASTEXITCODE
    Write-Host (Split-Path (Get-Location) -Leaf)  -nonewline
    Write-Host " " -nonewline
    Write-VcsStatus -nonewline
    $LASTEXITCODE = $origLastExitCode
    "$('> ')"
}

Import-Module posh-git

プラグイン開発環境

複数プラグインの開発を行うため、グローバルでインストールして、プラグインごとのモジュールはインストールされないように設定します。

.ps
npm install -g @kintone/create-plugin
npm install -g @kintone/plugin-packer
npm install -g @kintone/plugin-uploader
npm install -g npm-run-all
  • create-plugin の変更
    プラグイン作成時に、不要なモジュールを展開しないように、コメントにする

C:\Program Files (x86)\Nodist\bin\node_modules@kintone\create-plugin\dist\src\generator.js

.js
    // (0, deps_1.installDependencies)(outputDirectory, lang);

fs-extra, shelljs は、プラグインの製品版から試用版等を作成するスクリプトで利用します。

.ps
npm install -g fs-extra
npm install -g shelljs

ドメインの指定に、"HTTPS://" が必要になったようです。

.ps
# Windows(PowerShell)の場合
# 環境変数へ永続的にkintoneの情報を設定する
$ [System.Environment]::SetEnvironmentVariable("KINTONE_DOMAIN", "https://<サブドメイン>.cybozu.com", "User")
$ [System.Environment]::SetEnvironmentVariable("KINTONE_USERNAME", "<ログイン名>", "User")
$ [System.Environment]::SetEnvironmentVariable("KINTONE_PASSWORD", "<パスワード>", "User")
1
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?