Skip to content
This repository has been archived by the owner on Feb 9, 2022. It is now read-only.

Commit

Permalink
Switch from Traceur to Babel.
Browse files Browse the repository at this point in the history
  • Loading branch information
fitzgen committed Sep 27, 2015
1 parent e3aeb1c commit 2c287ff
Show file tree
Hide file tree
Showing 97 changed files with 11,234 additions and 14,400 deletions.
4 changes: 1 addition & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
*.map binary
wu.es5.js binary
test-es5/* binary
dist/* binary
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: node_js
sudo: false
node_js:
- "0.10"
- 0.12
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# `wu.js`

[![Build Status](https://travis-ci.org/fitzgen/wu.js.png?branch=master)](https://travis-ci.org/fitzgen/wu.js)

[![NPM](https://nodei.co/npm/source-map.png)](https://www.npmjs.com/package/wu)

`wu.js` is a JavaScript library providing higher order functions (such as `map`,
`filter`, and `reduce`) for ECMAScript 6 iterators.

Expand Down
42 changes: 8 additions & 34 deletions _includes/contributing.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ <h3><a href="#contributing">Contributing</a></h3>
<h4><a href="#building">Building</a></h4>

<p>
To compile <code>wu.js</code> and its tests to ES5 using Traceur
Compiler, run:
To compile <code>wu.js</code> and its tests to ES5 using the Babel compiler,
run:
</p>

<pre><code>$ npm run build</code></pre>
Expand All @@ -45,17 +45,14 @@ <h4><a href="#building">Building</a></h4>

<ul>
<li>
<code>wu.es5.js</code> &mdash; The ES5 compatible version
of <code>wu.js</code> with the Traceur runtime library included.
<code>dist/wu.js</code> &mdash; The ES5 compatible version of <code>wu.js</code>.
</li>
<li>
<code>wu.es5.map</code> &mdash; The source map for the ES5 compatible
version of <code>wu.js</code>.
<code>dist/wu.debug.js</code> &mdash; The ES5 compatible version of <code>wu.js</code> with
an inline source map included.
</li>
<li>
<code>test-es5/</code> &mdash; A copy of the test directory with
all tests compiled down to ES5 and uses the ES5 version
of <code>wu.js</code>.
<code>dist/wu.min.js</code> &mdash; The minified ES5 compartible version of <code>wu.js</code>.
</li>
</ul>
</section>
Expand All @@ -65,40 +62,17 @@ <h4><a href="#tests">Tests</a></h4>

<h5>Running the Test Suite</h5>

<p>
There are two testing modes, and you should ensure that both modes pass when
submitting pull requests.
</p>

<ul>
<li>
<a href="test/test.html">Run the ES6 tests in your browser.</a> (At the
time of writing, this only works in Firefox 33+, but provides the best
debugging.)</li>

<li>
<a href="test-es5/test.html">Run the transpiled ES5 version of the tests
and <code>wu.js</code> in your browser.</a>
</li>
</ul>
<pre><code>$ npm test</code></pre>

<h5>Creating New Tests</h5>

<p>
To add a new test, find or create the appropriate file
in <code>test/test-X.js</code>. If creating a new test file, make
sure to add a script tag
to <code>test/test.html</code>. <a href="http://visionmedia.github.io/mocha/">Mocha</a>
in <code>test/test-X.js</code>. <a href="http://visionmedia.github.io/mocha/">Mocha</a>
is the test
runner. <a href="http://chaijs.com/api/assert/">Chai's <code>assert</code>
module</a> is used for assertions.
</p>

<p>
Note that new tests will be copied into the <code>test-es5/</code>
directory and compiled down to ES5 automatically when
you <a href="#building">rebuild the project</a>.
</p>
</section>

<section id="documentation">
Expand Down
8 changes: 6 additions & 2 deletions test/helpers.js → assert.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
window.assert = chai.assert;
const wu = require("./wu");
const chai = require("chai");
const mocha = require("mocha");

const assert = module.exports = chai.assert;

// Helper for asserting that the given thing is iterable.
assert.iterable = thing => {
Expand All @@ -23,4 +27,4 @@ assert.eqArray = (expected, actual) => {
assert.deepEqual(expected, [...actual]);
};

mocha.setup('bdd');
// mocha.setup('bdd');
Loading

0 comments on commit 2c287ff

Please sign in to comment.