white-paper v1.0.0
White Paper
Purpose
...looking for it
Installation
npm install white-paper
Server
The script server.js
is used to start an express server that serves the content of the public
directory.
In it there's a showcase of the framework functionality as well as the QUnit test runner that executes in the browser.
The server is based on express and transpiles the src
files on the fly using some middleware
functions that ultimately rely on babel and node-sass.
Both sass and babel options are specified in server.js
during at the instantiation of the Server class.
The
.babelrc
file in the project home is used by the mocha babel compiler. Mocha unit tests run in Node so they are transpiled into CJS modules while the server transpiles the contents of src into SystemJS modules.
Unit testing in the browser
Since most of the functionality of the framework requires a full fledged DOM the best way to run the unit tests is within Chrome.
Using IntelliJ IDEA or WebStorm debugging is extremely comfy.
The script qunit.js
can be associated with a debugged page like this:
This way one can just put breakpoints in the source code inside of the IDE to debug.
Credit and Thanks
Paper Plane Icon by Tahsin Tahil is licensed under CC BY 3.0
6 years ago