Benjamin Foote
2014-02-21
[email protected]
As part of the PTP SplashPage2014 effort...
The PTP Splash page is backed by some static files from a server
The static files (mostly javascript) are built from js in the src directory using nodejs.
depends on a recent nodejs and npm
first, clone the repo
git clone [email protected]:personaltelco/ptp-splash-server.git
cd ptp-splash-server
then run
npm install
before you do anything
cp ./config/config.js.example ./config/config.js
The config.js file as provided in the example uses a handoff of configuration via a hash named pageConf
which is set in the browser
(see ptp-splash-page). You probably don't need to change it at all.
then call
make
If you're looking to make edits to some of the splashpage sections that get loaded you'll want to edit the dustjs (handlebars style) templates in ./src/dust and then run
make
Which will call grunt
, a nodejs build tool. grunt is configured by Gruntfile.js
to exec build commands including dustc
(dust compiler) to turn those templates into
javascript. uglify
and cssmin
is then called to each combine and minify all the
javascript and css respectively (as configured in Gruntfile.js) and spits out
./htdocs/js/ptp-splash-server.min.js
./htdocs/css/ptp-splash-server.min.css
which is what gets called by the HTML in the browser (served from the router) which resides in the repo ptp-splash-page