読者です 読者をやめる 読者になる 読者になる

uokadaの見逃し三振は嫌いです

ここで述べられていることは私の個人的な意見に基づくものであり、私が所属する組織には一切の関係はありません。

Coffee Script用にgruntを入れてみた。

仕事でJavascriptを使いそうなので予習がてらにちょっとCoffee Scriptを触ってみる。

コンパイルが面倒くさそうなのでgruntを一緒に使ってみようと思って、 インストールした。 以下、ログ。 

% npm install -g grunt
npm http GET https://registry.npmjs.org/grunt
npm http 200 https://registry.npmjs.org/grunt
npm http GET https://registry.npmjs.org/grunt/-/grunt-0.4.1.tgz
npm http 200 https://registry.npmjs.org/grunt/-/grunt-0.4.1.tgz
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/colors
npm http GET https://registry.npmjs.org/dateformat/1.0.2-1.2.3
npm http GET https://registry.npmjs.org/eventemitter2
npm http GET https://registry.npmjs.org/hooker
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/iconv-lite
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/underscore.string
npm http GET https://registry.npmjs.org/which
npm http GET https://registry.npmjs.org/js-yaml
npm http GET https://registry.npmjs.org/findup-sync
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/lodash
npm http 200 https://registry.npmjs.org/dateformat/1.0.2-1.2.3
npm http GET https://registry.npmjs.org/dateformat/-/dateformat-1.0.2-1.2.3.tgz
npm http 200 https://registry.npmjs.org/hooker
npm http GET https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz
npm http 200 https://registry.npmjs.org/colors
npm http GET https://registry.npmjs.org/colors/-/colors-0.6.0-1.tgz
npm http 200 https://registry.npmjs.org/eventemitter2
npm http 200 https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.11.tgz
npm http GET https://registry.npmjs.org/coffee-script/-/coffee-script-1.3.3.tgz
npm http 200 https://registry.npmjs.org/iconv-lite
npm http GET https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.8.tgz
npm http 200 https://registry.npmjs.org/underscore.string
npm http 200 https://registry.npmjs.org/which
npm http GET https://registry.npmjs.org/underscore.string/-/underscore.string-2.2.0rc.tgz
npm http GET https://registry.npmjs.org/which/-/which-1.0.5.tgz
npm http 200 https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/rimraf/-/rimraf-2.0.3.tgz
npm http 304 https://registry.npmjs.org/findup-sync
npm http 304 https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/nopt
npm http 304 https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/lodash/-/lodash-0.9.2.tgz
npm http 200 https://registry.npmjs.org/dateformat/-/dateformat-1.0.2-1.2.3.tgz
npm http 200 https://registry.npmjs.org/js-yaml
npm http GET https://registry.npmjs.org/js-yaml/-/js-yaml-2.0.4.tgz
npm http 200 https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz
npm http 200 https://registry.npmjs.org/colors/-/colors-0.6.0-1.tgz
npm http 200 https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.11.tgz
npm http 200 https://registry.npmjs.org/coffee-script/-/coffee-script-1.3.3.tgz
npm http 200 https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.8.tgz
npm http 200 https://registry.npmjs.org/underscore.string/-/underscore.string-2.2.0rc.tgz
npm http 200 https://registry.npmjs.org/which/-/which-1.0.5.tgz
npm http 200 https://registry.npmjs.org/rimraf/-/rimraf-2.0.3.tgz
npm http 200 https://registry.npmjs.org/lodash/-/lodash-0.9.2.tgz
npm http 200 https://registry.npmjs.org/js-yaml/-/js-yaml-2.0.4.tgz
npm http 200 https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/async/-/async-0.1.22.tgz
npm http 200 https://registry.npmjs.org/async/-/async-0.1.22.tgz
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/abbrev
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/sigmund
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/argparse
npm http 304 https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/abbrev
npm http 304 https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.1.14.tgz
npm http 304 https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/inherits
npm http 200 https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.1.14.tgz
npm http 200 https://registry.npmjs.org/argparse
npm http GET https://registry.npmjs.org/argparse/-/argparse-0.1.13.tgz
npm http 200 https://registry.npmjs.org/argparse/-/argparse-0.1.13.tgz
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/underscore.string
npm http 304 https://registry.npmjs.org/underscore.string
npm http GET https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.1.tgz
npm http 200 https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz
npm http 200 https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.1.tgz
npm http 200 https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz
grunt@0.4.1 /usr/local/share/npm/lib/node_modules/grunt
├── dateformat@1.0.2-1.2.3
├── colors@0.6.0-1
├── hooker@0.2.3
├── async@0.1.22
├── eventemitter2@0.4.11
├── which@1.0.5
├── coffee-script@1.3.3
├── underscore.string@2.2.0rc
├── iconv-lite@0.2.8
├── lodash@0.9.2
├── nopt@1.0.10 (abbrev@1.0.4)
├── minimatch@0.2.12 (sigmund@1.0.0, lru-cache@2.3.0)
├── glob@3.1.21 (inherits@1.0.0, graceful-fs@1.2.0)
├── findup-sync@0.1.2 (lodash@1.0.1)
├── rimraf@2.0.3 (graceful-fs@1.1.14)
└── js-yaml@2.0.4 (argparse@0.1.13)

% npm install -g grunt-cli
npm http GET https://registry.npmjs.org/grunt-cli
npm http 200 https://registry.npmjs.org/grunt-cli
npm http GET https://registry.npmjs.org/grunt-cli/-/grunt-cli-0.1.7.tgz
npm http 200 https://registry.npmjs.org/grunt-cli/-/grunt-cli-0.1.7.tgz
npm http GET https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/findup-sync
npm http GET https://registry.npmjs.org/resolve
npm http 200 https://registry.npmjs.org/findup-sync
npm http GET https://registry.npmjs.org/findup-sync/-/findup-sync-0.1.2.tgz
npm http 200 https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz
npm http 200 https://registry.npmjs.org/resolve
npm http GET https://registry.npmjs.org/resolve/-/resolve-0.3.1.tgz
npm http 200 https://registry.npmjs.org/findup-sync/-/findup-sync-0.1.2.tgz
npm http 200 https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz
npm http 200 https://registry.npmjs.org/resolve/-/resolve-0.3.1.tgz
npm http GET https://registry.npmjs.org/abbrev
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/lodash
npm http 200 https://registry.npmjs.org/abbrev
npm http GET https://registry.npmjs.org/abbrev/-/abbrev-1.0.4.tgz
npm http 200 https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/glob/-/glob-3.1.21.tgz
npm http 200 https://registry.npmjs.org/abbrev/-/abbrev-1.0.4.tgz
npm http 200 https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/lodash/-/lodash-1.0.1.tgz
npm http 200 https://registry.npmjs.org/glob/-/glob-3.1.21.tgz
npm http 200 https://registry.npmjs.org/lodash/-/lodash-1.0.1.tgz
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/inherits
npm http 200 https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.0.tgz
npm http 200 https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/inherits/-/inherits-1.0.0.tgz
npm http 200 https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/minimatch/-/minimatch-0.2.12.tgz
npm http 200 https://registry.npmjs.org/inherits/-/inherits-1.0.0.tgz
npm http 200 https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.0.tgz
npm http 200 https://registry.npmjs.org/minimatch/-/minimatch-0.2.12.tgz
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http 200 https://registry.npmjs.org/sigmund
npm http GET https://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz
npm http 200 https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/lru-cache/-/lru-cache-2.3.0.tgz
npm http 200 https://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz
npm http 200 https://registry.npmjs.org/lru-cache/-/lru-cache-2.3.0.tgz
/usr/local/share/npm/bin/grunt -> /usr/local/share/npm/lib/node_modules/grunt-cli/bin/grunt
grunt-cli@0.1.7 /usr/local/share/npm/lib/node_modules/grunt-cli
├── resolve@0.3.1
├── nopt@1.0.10 (abbrev@1.0.4)
└── findup-sync@0.1.2 (lodash@1.0.1, glob@3.1.21)
% rehash    
% which grunt
/usr/local/share/npm/bin//grunt

pythonのwatchdogでも同じ事出来たのかな? たぶん、出来ると思うのであとで調べてみよう。

人気そうなGruntで、StylusとかCoffeeScriptをビルドする ::ハブろぐ 文系プログラマーの悪あがき: Grunt.jsでファイルを更新したらCoffeeScriptを自動compiileする