LoginSignup
9
16

More than 5 years have passed since last update.

ATOMでJavaScriptの最強開発環境を作る

Posted at

前提

  • Windows上で使う。
  • package.jsonが良しなに書かれている。
  • コマンドラインから、「apm install xxx」でインストール。

atom-runner

  • ALT+Rでスクリプトを実行できる。
  • jsだと、nodeがそのまま立ち上がるので、--harmonyで拡張機能が使えるようにしてあげる。
  • 編集中のテストを単体実行できるように、拡張子test.jsに対して、「npm.cmd run test --」とする。
config.cson
"*":
  'runner':
    'scopes':
      'js': 'node --harmony'
    'extensions':
      'test.js': 'npm.cmd run test --'
package.json
{
  "scripts": {
    "test": "mocha"
  }
}

browser-plus

  • ATOM上にChromeのViewを開く。
  • Ctrl+Alt+Oで開く。

file-icons

  • ツリーのファイルのアイコンをそれっぽくする。

linter・linter-eslint

  • .eslint.*は良しなに。
  • .eslintignoreで必要なところだけ、eslint対象にする。
.eslintignore
*.js
!src/**/*.js

platformio-ide-terminal

  • ATOM上にbashを使えるようにする。
  • 下の+で現れる。ちょっとわかりづらい。
  • デフォルトだとPowerShellなので、git-bashを設定する。
  • スペースを含むとダメっぽいので、下のように、8.3のパスで指定......
  • 文字がにじんで見える気がするんですが......お疲れですか???
  • 編集中のファイルと同じディレクトリに移動したいけどできるのかな。
config.cson
"*":
  "platformio-ide-terminal":
    core:
      shell: "C:\\PROGRA~1\\Git\\bin\\bash.exe"
9
16
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
9
16