From 732d4836d9ecd6fa2f698fc31d6f068c93d8c349 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Thu, 9 Oct 2014 16:46:02 +1100 Subject: [PATCH] add testling --- Makefile | 2 +- README.md | 6 +++++- package.json | 10 ++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 30bcb7304b..0d439b943c 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ test-travis: test-browser: make build node bin/generate-browser-test >dist/6to5-test.js - open test/browser/index.html + test -n "`which open`" && open test/browser/index.html build: mkdir -p dist diff --git a/README.md b/README.md index 63a9b41f07..d7051e3a97 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ **6to5** turns ES6 code into vanilla ES5, so you can use ES6 features **today.** - **Fast** - no redundant code added so your compiled code is as fast as possible. - - **Extensible** - with a large range of [plugins](#plugins) and browser support. + - **Extensible** - with a large range of [plugins](#plugins) and **browser support**. - **Lossless** - **source map support** so you can debug your compiled code with ease. - **Compact** - maps directly to the equivalent ES5 with **no runtime**. - **Concise** - does not pollute scope with unnecessary variables. @@ -184,10 +184,14 @@ global `to5`. to5("class Test {}").code; ``` +#### Test + To test 6to5 in your browser run: $ make test-browser +[![Testling](https://ci.testling.com/sebmck/6to5.png)](https://ci.testling.com/sebmck/6to5) + ## Modules 6to5 modules compile straight to CommonJS, because of this various liberties are diff --git a/package.json b/package.json index 624f28aa9b..acfed5c2b8 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,16 @@ "bench": "make bench", "test": "make test" }, + "testling": { + "harness": "mocha-tdd", + "preprocess": "make test-browser", + "html": "test/browser/index.html", + "browsers": [ + "ie/8..latest", + "chrome/latest", + "firefox/latest" + ] + }, "dependencies": { "ast-types": "0.5.0", "commander": "2.3.0",