lfa

learnforward-author is a build tool for generating HTML5 textbooks

npm install lfa
88 downloads in the last week
149 downloads in the last month

Introduction

LearnForwardAuthor is a build tool for generating HTML5 textbooks. Application structure and functionality is heavily inspired by roots.

Installation

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.

Usage

LFA is a command line tool. For the basic help, run:

$ lfa

Contributing

Install vagrant (don't forget about virtualbox), and 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

Reading through 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 patterns/ folder:

$ 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.

License (MIT)

See license.txt.

Bitdeli Badge

npm loves you