learnforward-author is a build tool for generating HTML5 textbooks
Want to see pretty graphs? Log in now!
npm install lfa
|9||downloads in the last day|
|26||downloads in the last week|
|154||downloads in the last month|
|Last Published By|
|Version||0.4.22 last updated 7 days ago|
|Keywords||textbook, development, build, tool|
|Dependencies (23)||minimatch, js-yaml, monocle, async, stylus, jade, marked, clean-css, uglify-js, snockets, mkdirp, q, coffee-script, connect, faye-websocket, open, readdirp, underscore, colors, shelljs, update-notifier, optimist, autoprefixer|
LearnForwardAuthor is a build tool for generating HTML5 textbooks. Application structure and functionality is heavily inspired by roots.
Make sure you have node.js installed, then run:
$ npm install -g lfa
If you get permission issues you most likely have a dodgy node installation. You can probably circumvent it temporarily with
sudo -H npm install -g lfa.
LFA is a command line tool. For the basic help, run:
$ vagrant up
This will automatically provision a virtual machine with all the necessary dependencies necessary to properly test the tool. Next, you will have to ssh into the machine:
$ vagrant ssh
LFA has two separate test suites: one deals with the build tool, the other deals with the functionality and visuals of the generated textbooks.
The build tool tests are located in
/vagrant/test/ and can be executed via running
npm test from the root folder:
$ pwd /vagrant/ $ npm test
test/test.coffee is a good way to get a feel for what we expect the tool to be able to do, like compiling, moving files from one folder to the other, generating a table of contents from a particular folder structure and so on.
The textbook tests are located in
/vagrant/patterns/test/ and run through the same
npm test command, but this time from the
$ pwd /vagrant/patterns $ npm test
It's a PhantomCSS (through grunt-phantomcss to be more precise) test suite that runs a headless Chrome browser within the Ubuntu virtual machine in vagrant. It prods around a dummy textbook, clicks various things and takes screenshots of the application in its varying states and screen sizes.
While it is possible to run the build tool tests tests from outside the vagrant virtual machine to get faster suite speeds, that is not recommended for the textbook tests. This is because the visual regression PhantomCSS tests take actual screenshots of the page, and they would be invalidated if you ran them from a different operating system with different font rendering.