差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
software:intellij:phpstorm:file_watcher:babel [2018/04/04] – [テーブル] ikatakossoftware:intellij:phpstorm:file_watcher:babel [2019/04/11] (現在) – [設定方法] ikatakos
行 132: 行 132:
 |Scope|※後述| |Scope|※後述|
 |Program|babel.cmdのパスが自動入力されているが、同フォルダにあるbrowserify.cmdに変更| |Program|babel.cmdのパスが自動入力されているが、同フォルダにあるbrowserify.cmdに変更|
-|Arguments|''--transform babelify (変換元) -o (変換先)'' \\ (例) \\ ''--transform babelify $FileRelativePath$ -o js/$FileNameWithoutExtension$.min.js''|+|Arguments|''%%--%%transform babelify (変換元) -o (変換先)'' \\ (例) \\ ''%%--%%transform babelify $FileRelativePath$ -o js/$FileNameWithoutExtension$.min.js''|
 |Output paths to refresh|変換先 \\ (例) \\ ''js/$FileNameWithoutExtension$.min.js''| |Output paths to refresh|変換先 \\ (例) \\ ''js/$FileNameWithoutExtension$.min.js''|
 |Working directory|.babelrcのあるとこ \\ (例) \\ ''$ContentRoot$''| |Working directory|.babelrcのあるとこ \\ (例) \\ ''$ContentRoot$''|
- 
  
 Argumentsで出力パスを指定する場合、出力先フォルダはあらかじめ無いとエラーになるので注意。 Argumentsで出力パスを指定する場合、出力先フォルダはあらかじめ無いとエラーになるので注意。
 +
 +<note 90%>
 +なお、Browserify を使わず Babel を直接用いる場合、カレントディレクトリに注意する必要がある。babelの場合のコマンドライン指定は
 +
 +''babel {path/to/file.es6} --out-dir {path/to/outdir}''
 +
 +などとなるが、es6が相対パスでサブディレクトリ内にある場合、実際に出力される場所は
 +
 +''./path/to/outdir/path/to/file.js'' になってしまう。
 +
 +WorkingDirectory を ''path/to'' に移動すると上手くいく。.babelrc もそこに移すか、設定はコマンドラインで直接与えるかする。
 +</note>
  
 ===Scope=== ===Scope===
software/intellij/phpstorm/file_watcher/babel.txt · 最終更新: 2019/04/11 by ikatakos
CC Attribution 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0