Server

Acetates server mode is a Browsersync based live reloading server with the following features:

Fast startup and rendering times even for large sites.

Module: acetate/lib/modes/server

var Acetate = require('acetate');
var watch = require('acetate/lib/modes/watcher');

var aceate = new Acetate({
  // options
});

var browserSyncOptions = {}

var server = watch(acetate, browserSyncOptions);

// send a log message to browsers you can pass
//  any additional arguments you would like
server.sendLog('Hello!', );

// render a fullscreen message in the browser
server.sendFullscreenMessage('title', 'message', 'extra');

// reload all connected pages
server.reload()

// use server.stop() to stop the server

In general, you can pass any Browsersync options to the server mode as a second argument. However, Acetate will modify any options in the following way:


Edit this Page on GitHub