CoffeeScriptのREPLでunderscoreを`__`にrequireして起動する
956 ワード
_
は直前の実行結果を表す変数にbindされているので、underscoreは__
あたりを使えば良さそうですが、いちいち起動時に __=require 'underscore'
するのも面倒なので、
coffee -r __=underscore
のようにすればokです。
package.json
に
{
"scripts": {
"console": "coffee -r __=uncerscore",
}
}
などと書いておけば、npm run console
で起動できますね。
Author And Source
この問題について(CoffeeScriptのREPLでunderscoreを`__`にrequireして起動する), 我々は、より多くの情報をここで見つけました https://qiita.com/takiuchi/items/40eb519307a1b9ec7f25著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .