You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
grunt-coffee-react STATUS: DEPRECATED This tool is no longer maintained. If you need to transition your codebase from it, a codemod is available to do so: cjsx-codemod This project started as a way for me to explore how JSX could fit into Coffeescript syntax, as a quickly hacked together prototype. While I never really promoted it, it quickly took on a life of its own, and before long people were
This tool is no longer maintained. If you need to transition your codebase from it, a codemod is available to do so: cjsx-codemod. You can also use CoffeeScript 2, which has JSX built in. This project started as a way for me to explore how JSX could fit into Coffeescript syntax, as a quickly hacked together prototype. While I never really promoted it, it quickly took on a life of its own, and befo
Docco is a quick-and-dirty documentation generator, written in Literate CoffeeScript. It produces an HTML document that displays your comments intermingled with your code. All prose is passed through Markdown, and code is passed through Highlight.js syntax highlighting. This page is the result of running Docco against its own source file. Install Docco with npm: sudo npm install -g docco Run it ag
追記: タイトル変更。v1.9 でリリースされました(2015/01/30) ES6以降にやや慎重な対応をみせるcoffeescriptですが、やっとgenerator構文がサポートされたようです。 Add yield support · Issue #3073 · jashkenas/coffeescript · GitHub 色々と構文の候補がありましたが、関数ブロックの中にyieldキーワードが存在する場合は自動的にジェネレーター関数になるような仕様に落ち着いたみたいです。 generator概要(知ってる人は読み飛ばしてよい) 関数ブロックの中でyieldを使うと関数がgenerator化されます。yield化された関数は実行されるとgeneratorを返し、 generatorは.next()を叩くと次のyieldキーワードで渡された値が取得できます。もう一度叩くとその位置から次
cordovaを使う時にhamlとsassとcoffeeを使いたかったのでguardでそれぞれをwatchするようにした。 普段は何らかのWebサーバーが立ち上がってて出力を直接返すからこういう風にそれぞれの静的ファイルを必要とすることって意外と少ないですね。 $ gem install guard-haml guard-sass guard-coffeescript このようなディレクトリ構成にする場合。 # Guardfile haml_options = { format: :html5, attr_wrapper: '"', ugly: true } guard "haml", input: "haml", output: "www", haml_options: haml_options do watch %r{^haml/.+\.haml} end guard "sass",
久々にTitaniumを触るにあたってCoffeeScriptのコンパイルをGuardにまかせることにしてみたメモ。 Guardはファイルの変更を監視して、変更があったタイミングで何らかの処理を実行できるツール。 これを利用するとCoffeeScriptを書いたそばから自動的にJavaScriptに変換するなんてことも簡単にできるわけで。 そしてそのものずばりのことを実現するGuard::CoffeeScriptなんてものがあったりします。 Guard::CoffeeScriptの導入 gem install guard-coffeescript これでGuard本体も入る。あ、要Rubyです。 追記 ファイルシステム監視のために以下のGemも必要だった。 gem install rb-fsevent 上記はMacの場合でLinuxとWindowsの場合は違うGemになるので詳しくはGua
こんにちは。毎年花粉症になりかけている飯塚です。 最近のNode.jsの普及などによってサーバサイドJavaScript界隈が盛り上がっています。 そんなホットなJavaScriptをラクにかつエレガントに書くためのCoffeeScriptという言語をチュートリアル風に紹介します。 何かしらのライブラリを自分で書く程度にJavaScriptで開発している人は絶対に使ったほうがいいと思います。 JavaScriptを知っていれば1-2時間程度で十分駆使できるようになります。 (2011/6/28:@m_satyr様にご指摘頂いた箇所を修正しました。) 目次 CoffeeScriptとは? インストール Hello World 構文 関数 変数展開 Objectの生成 ループ 存在チェック ヒアドキュメント thisのバインド クラス 無名関数 {var} Tips ?の使い分け 存在チェック
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く