Minify した JS はコンパイル時の最適化によってコードパスが変更されていることがあります。 テストによっては正しいコードパスで実行されているか確認したいこともあるので、そのようなテストは Minify する前の JS で行います。
Minify しても export されているようなメソッドなどのテストは、どちらでも実行できるはずですので両方で実行するようにします。
function Fladdict(img) { | |
this.image = img; | |
this.canvas; | |
this.context; | |
this.backgroundColor; | |
this.textColor = []; | |
this.edgeColor; | |
this.colorHistogram; | |
} |
make: | |
gcc *.c -O2 -W -Wall -Wextra -ansi -pedantic -lm -lz -o zopfli_png | |
debug: | |
gcc *.c -g3 -lm -lz -o zopfli_png |
/*** | |
* A JSX application. | |
*/ | |
import "js.jsx"; | |
final class ByteArray { | |
static function get(array: Array.<int>, n: int): int { | |
return array[n]; | |
} | |
} |
/*** | |
* A JSX application. | |
*/ | |
class Hoge.<T> { | |
var a: T; | |
var b: Map.<string>; | |
function constructor(a: T, option: Map.<string> = {}) { | |
this.a = a; |
var JSX={};(function(f){function a(b,e){var a=function(){};a.prototype=e.prototype;var c=new a;for(var d in b){b[d].prototype=c}}function at(c,b){for(var a in b.prototype)if(b.prototype.hasOwnProperty(a))c.prototype[a]=b.prototype[a]}function e(a,b,d){function c(a,b,c){delete a[b];a[b]=c;return c}Object.defineProperty(a,b,{get:function(){return c(a,b,d())},set:function(d){c(a,b,d)},enumerable:true,configurable:true})}function as(a,b,c){return a[b]=a[b]/c|0}var v=parseInt;var y=parseFloat;function ar(a){return a!==a}var a7=isFinite;var a8=encodeURIComponent;var a9=decodeURIComponent;var ad=encodeURI;var ag=decodeURI;var ah=Object.prototype.toString;var ak=Object.prototype.hasOwnProperty;function g(){}f.require=function(b){var a=n[b];return a!==undefined?a:null};f.profilerIsRunning=function(){return g.getResults!=null};f.getProfileResults=function(){return(g.getResults||function(){return{}})()};f.postProfileResults=function(a,b){if(g.postResults==null)throw new Error('profiler has not been turned on');return g. |
{ | |
"framework" : "mocha+chai", | |
"src_files" : [], | |
"serve_files" : [ | |
"external/should/should.js", | |
"tests/build/*.js" | |
], | |
"launch_in_dev" : [ | |
"Chrome" | |
] |
このエントリは以前書いた転職先募集エントリに対する報告エントリとなります。
正直、エントリを書いた時点では面白がる人はいても実際に声をかけてくる人はいないだろうなと思っていました。 自分自身のスキルセットややりたい事などを考えると、マッチするところは限りなく少ないか、あるいはあったとしても偶然自分の書いたエントリを目にすることなど少ないだろうと思っていたからです。 前回のエントリは「いやあ、転職先は一応探したんだけどダメだったから仕方なく、本当に仕方なく光の戦士として生きていくしかないなあ」という自分に対する言い訳をするためのエントリという面もあったのです。
if (window.Uint8Array !== void 0) { | |
try { | |
String.fromCharCode.apply(null, new Uint8Array([0])); | |
} catch(e) { | |
String.fromCharCode.apply = (function(fromCharCodeApply) { | |
return function(thisobj, args) { | |
return fromCharCodeApply.call(String.fromCharCode, thisobj, Array.prototype.slice.call(args)); | |
} | |
})(String.fromCharCode.apply); | |
} |