笑いながらコードを書く。

vimから出たくないフロントエンドエンジニアの備忘録的な何か。

Closure Compiler

Closure Compilerのexternsでプロパティを圧縮しないようにする設定方法

ドキュメントとかに書いてなくてデフォルトで設定されるextern見ててわかった。 // externs Object.prototype.hogehoge; なるほどなーって感じ。

Closure CompilerのADVANCED OPTIONで.を['']に書き換えるのが面倒なのでmapする

nnoremap <expr> ;jrb getline('.')[col('.')-1] ==# '.' ? "s['<Esc>ea']<Esc>F[" : "F.s['<Esc>ea']<Esc>F["nnoremap <expr> ;jrd getline('.')[col('.')-1] ==# '[' ? "2s.<Esc>f]h2xF." : "F[2s.<Esc>f]h2xF." 結構便利。</esc></esc></expr></esc></esc></esc></esc></expr>

Google Closure Compilerで圧縮レベルを最大にする

--compilation_level ADVANCED_OPTIMIZATIONS