試験は twada/battlefield-sourcemaps で行っている
- SourceMap 対応が入った espower 0.9.0 を使う
- espower(ast, options) の第二引数 options に
sourceMap
というキーで上流の SourceMap オブジェクトを入れる
var ChatAppDispatcher = require('../dispatcher/ChatAppDispatcher'); | |
var ChatConstants = require('../constants/ChatConstants'); | |
var ChatMessageUtils = require('../utils/ChatMessageUtils'); | |
var EventEmitter = require('events').EventEmitter; | |
var ThreadStore = require('../stores/ThreadStore'); | |
var merge = require('react/lib/merge'); | |
var ActionTypes = ChatConstants.ActionTypes; | |
var CHANGE_EVENT = 'change'; |
試験は twada/battlefield-sourcemaps で行っている
sourceMap
というキーで上流の SourceMap オブジェクトを入れるby Keith Rosenberg (netpoetica)
Note: do this in some sort of project/ directory that makes sense. depot_tools are going to need to be in your path, so you may want to install them somewhere you are comfortable with.
git clone https://github.com/v8/v8.git
This is a Japanese translation from the original Gist in English. 原文:You're Missing the Point of Promises by Domenic Denicola
====== この記事は私のブログでも掲載しています。また、記事中で Promises/A に言及している箇所がありますが、この記事が書かれた当時は Promises/A+の仕様がまだ存在しなかったので、少し古く感じられるかもしれません。
// applicationCacheの更新を妨害する | |
Object.defineProperty(this,'applicationCache',{get:function(){return{}}}); | |
(function () { | |
// AppCache上でlocation.hrefを読み込むとAppCacheの内容を読み込むため、「ブラウザは別URLと認識するが、サーバは同じコンテンツを返すURL」を作る | |
contentLoad(location.href+'/'); | |
// 本来であればsubmit等のイベントもキャッチする必要がある | |
window.addEventListener('click', function (evn) { | |
var elem = evn.target; | |
while (elem.tagName.toLocaleLowerCase() != 'a') elem = elem.parentNode; |
http://d.hatena.ne.jp/gfx/20130521/1369159181 の追試。 as of JSX 0.9.89
title | command | size | ratio |
---|---|---|---|
original | jsx --release src/jsx-node-front.jsx | wc -c | 1697 | 1.00 |
minify | jsx --release --minify src/jsx-node-front.jsx | wc -c | 364 | 0.21 |
gcc | jsx --release src/jsx-node-front.jsx | closure-compiler | wc -c | 703 | 0.41 |
gcc/A | jsx --release src/jsx-node-front.jsx | closure-compiler --compilation_level ADVANCED_OPTIMIZATIONS | wc -c | 345 | 0.20 |
このコミットで、実質的な定数をうまく推論できるようになった。(現在のmasterではデフォルト有効になっている)
以下のいずれかの条件を満たしたとき、その変数を定数とみなす。
<div class="navbar-container"> | |
<div class="navbar-header"> | |
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"> | |
<span class="sr-only">Toggle navigation</span> | |
<i class="fa fa-bars"></i> | |
</button> | |
<a class="navbar-brand" href="/"> | |
... | |
</a> | |
</div> |
今回問題になりそうだったのは、2013年12月に新設されたChromeウェブストアの、通称single purpose
ポリシー(参考記事)。「Chrome拡張やChromeアプリは、シンプルで分かりやすいただひとつの機能(または問題に対するソリューション)でなければならない」というもの。それゆえ「多機能のChrome拡張は分割実装しないと6月からストア公開を差し止めにするかもよー」という御触れが出ていて、一部Chrome拡張開発者はガクブルしていた。
以下のメール全文は、この件について「艦これウィジェットってちゃんとsingle purpose
になってる?ねえどうなの?」ていう問い合わせに対する"Chrome Web Store Policy Team"からの返信です。
Dear Developer,
Thank you for contacting the Chrome Web Store Policy Team. Upon review, we’ve determined that your extension (url) is compliant with our extensions quality guidelines.
$ ruby -e 'C=`stty size`.scan(/\d+/)[1].to_i;S="\xf0\x9f\x8d\xa3";a={};puts "\033[2J";loop{a[rand(C)]=0;a.each{|x,o|;a[x]+=1;print "\033[#{o};#{x}H \033[#{a[x]};#{x}H#{S} \033[0;0H"};$stdout.flush;sleep 0.01}' |