Created
July 22, 2013 23:57
-
-
Save 1N50MN14/6058736 to your computer and use it in GitHub Desktop.
Complete livereload example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var unreal = require('unrealjs'), | |
host = unreal.isProduction ? '55.55.55.55' : '127.0.0.1', | |
port = unreal.isProduction ? 8888 : 9999 | |
var services = unreal.serviceRegistry.connect(host, port) | |
var config = { | |
views: { //must always contain a layout file (either .html or .jade) | |
paths: ['views/'], | |
options: {}, | |
locals: {} | |
}, | |
styles: { | |
engine: 'less', // 'less' or 'stylus' | |
filename: 'styles/styles.less', //main stylesheet | |
paths: ['styles/', 'styles/imports/'], //import folders | |
minify: false, | |
output: 'gen/app.css' | |
}, | |
js: { | |
client: 'app/', | |
commonjs: [], // array of node modules to make requirable client-side | |
shim: [], //non node module to shim and make requireable client-side | |
minify: false, | |
output: 'gen/app.js' | |
}, | |
http: { | |
static: 'public/', | |
port: 3000, | |
ssl: { | |
enabled: false, | |
key: 'sslcert/server.key', | |
cert: 'sslcert/server.crt' | |
} | |
}, | |
webinstance: { //webinstance meta for livereload to connect to | |
role: 'web', | |
version: '0.0.1' | |
} | |
} | |
var livereload = new unreal.LiveReload(services, config, unreal.router) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment