LoginSignup
3
3

More than 5 years have passed since last update.

Gulp.jsをMacのFinderからダブルクリック起動

Posted at

Gulpを実行するのにいちいちターミナルを起動してはいませんか?
ごくごく簡単な方法でGulp.jsをダブルクリック起動できます。

やり方

1.テキストエディタで実行するコマンドを書く

cd /Users/hoge/www/myweb/ ← gulpfile.jsのある場所
/usr/local/bin/gulp ← gulpの実体。ほとんどの人はここだと思います

2.保存する

【1】で作ったテキストファイルを保存します。
ファイル名は glup_プロジェクト名.command とかだとわかりやすいです。
保存場所はどこでもいいでしが、gulpfile.jsと同じ場所だと管理しやすいかもしれません。

3.ターミナルで実行権限を設定

ターミナルを起動し、作成したファイルの場所に移動します。

# cd /Users/hoge/www/myweb/

chmod で実行権限を与えます。

# chmod +x glup_プロジェクト名.command

4.実行

あとはFinderからダブルクリックすれば起動します。

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