Commit graph

8 commits

Author SHA1 Message Date
David Majda f5a372b075 Use "test" and "tests" instead of "spec" and "specs"
This reflects a convention used in most JavaScript projects. The change
involves renaming the "spec" directory, Gulp task, etc.
2016-12-08 10:05:17 +01:00
David Majda 9956b42392 Switch from Make to Gulp
The core of the transition is getting rid of Makefile and replacing it
with gulpfile.js. The rest is details (fixing dependencies, changing all
references to "make", etc.).

Target/task names mostly stay the same, so in most cases "gulp foo" does
what "make foo" did before. The only exceptions are "make browser" and
"make browserclean", which are now "gulp browser:build" and "gulp
browser:clean" (it feels more systematic).

Functionality is mostly unchanged (modulo Gulp clutter in the console),
but there are two small exceptions:

  gulp spec

    The reporter now displays just dots while previously it displayed
    spec descriptions. There is also a deprecation warning (most likely
    because I used an old version of gulp-jasmine in order to support
    Jasmine 1.x). I kept these issues unfixed because I plan to switch
    to Mocha soon (#409).

  gulp browser:build

    The copyright header is now added manually both to the development
    and minified build. Before, it was added only to the development
    build and the minified build relied on preserving it using "uglify
    --comments". This was broken since switching to //-style comments.

    There is now also an empty line between the header and the source
    code.

Fixes #444.
2016-10-11 11:53:25 +02:00
David Majda 5c40fff136 Pass spec code through Babel before serving it to the browser
This will allow to use ES2015 constructs in spec code.

The change required introducing a small server, which serves both PEG.js
and spec code passed through Babel and bundled together. This allowed to
convert the specs to regular modules and get rid of the hackery that was
previously needed to make them run both in Node.js and in the browser.

Note the specs no longer exercise the browser version. This will allow
to spec PEG.js internals in the future.

See #442.
2016-09-08 14:53:00 +02:00
David Majda c50ad15461 Use http-server to serve specs and benchmarks to the browser
Previously, the instructions recommended using Python's SimpleHTTPServer
module, which created unnecessary dependency on Python.
2016-05-05 17:35:40 +02:00
David Majda 138405d89d Add syntax highlighting to code blocks in README.md files 2016-05-05 10:21:20 +02:00
David Majda c6f0818d49 Use sentence case consistently in {spec,benchmark}/README.md headers 2014-05-10 16:40:39 +02:00
David Majda f102814998 Rewrite spec/README.md
More clarity, better grammar (hopefully).
2014-05-09 15:09:53 +02:00
David Majda 24e1644c58 Convert spec/README to Markdown
It will look nicer on GitHub.
2014-05-09 14:37:05 +02:00
Renamed from spec/README (Browse further)