LoginSignup
2
2

More than 5 years have passed since last update.

Sublime Text でコマンドのパスを通す

Posted at

Sublime Textにはテキストエディタ上でBuildコマンドを実行出来るようになっている。

node.jsのBuildコマンドはデフォルトでは入っていないので新規追加した所、そんなコマンドはないと言われた。
コマンドに書いたのは以下(実行環境はMac)

node.sublime-build
{
    "cmd": ["node", "$file", "file_base_name"],
    "working_dir": "${project_path:${folder}}",
    "selector": "*.js"
}

Macのnode.jsはnodebrewを使っていたため、
デフォルトではパスが通っていない模様。

そこで以下を追記すると動きます。

"path": "$HOME/.nodebrew/current/bin"

nodeのコマンドの場所は適宜変更で。

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