Node.js and its package manager npm are required dependencies. The following versions were used for development:
- node -> 6.7.0
- npm -> 3.10.3
Once these dependencies are installed and the git repo cloned, execute the following to install all the node dependencies:
npm -g install grunt-cli
npm install
The JavaScript task runner grunt is used to build wedding-website.
grunt
--prod
- Builds wedding-website for production, uglifying the generated JS and CSS files--watch
- Watchesjs/lib/**
,js/deps/**
, andscss/**
for file changes and rebuilds
The wedding-website repository contains a Python 2.7.x HTTP server that serves the files in the "site" directory created by the grunt build.
If the system is a Unix environment, the server can be started via grunt like so:
# The server listens on port 8000 by default
grunt server
The port that the server listens on can be changed by passing the argument --port=<port>
:
grunt server --port=8881
Note: Not all output from test_server.py is outputted when running the server with grunt. This seems to be an issue with grunt-shell.
Alternatively, the server can be started by being invoked directly:
# The server listens on port 8000 by default
./test/test_server.py
The port that the server listens on can be changed like so:
./test/test_server.py 8881