LoginSignup
2
3

More than 5 years have passed since last update.

atomプラグイン開発環境構築(TypeScript, Windows)

Posted at

はじめに

WindowsでTypeScriptなatomプラグインを書く環境構築メモ

手順

  • atomインストール
  • atom-typescriptプラグインインストール
  • node.jsインストール
  • dtsmインストール

atomインストール

から。お察し

atom-typescriptパッケージインストール

atom>メニュー>Setting View>Install Packages/Themes

からatom-typescriptを検索してインストール

node.jsインストール

無くてもatom&TypeScriptでプラグイン開発可能だけど、
npmコマンドでインストールしたい機能があったので。

からexeを落としてインストールすれば
Windows上でも簡単にnode.jsインストールとバージョン管理環境が用意できる

dtsmインストール

TypeScriptでは既存JavaScript資産を流用するために型情報を別途設定できるそう(.d.ts)
型情報ファイル管理が大変なので神様が管理ツールを作ってくれた

npm install -g dtsm

でインストール

プラグイン開発準備

  • atom起動
  • メニュー>パッケージ>Package Generator>Generate Atom Packageでひな形用意
  • dtsmでTypeScript型情報ファイルを用意
    • コマンドプロンプトを起動
    • パッケージ作成フォルダ(package.jsonがあるフォルダ)へ移動
    • dtsm install atom/atom.d.tsを実行
  • libフォルダとかにhoge.tsを置いてプラグイン実装
  • 保存するとTypeScriptコンパイルが動いて.jsが吐かれる
  • Ctrl+Alt+rでリロードするとプラグインが反映されて動作確認できる

2
3
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
2
3