1.0.13 • Published 9 years ago

automagic-systemjs-server v1.0.13

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

A SystemJS hot module replacer to loads file changes without full page refreshes.

#Usage Build Status

##1. Install npm install --save-dev automagic-systemjs-server

##2. Launch the server

var automagic = require('automagic-systemjs-server');
automagic.init(options);

###init(options) ####port socket.io server port to start on

defaults 3912

####origins socket.io CORS

default '*:*'

####newConnectionCallback function invoked on a new connection

default console.log('...', new Date());

##3. Publish automagic.fileChanged event to clients

gulp.watch(['*.js', '!node_modules/**'])
        .on('change', function (e) {
            var data = {
                fileName: path.basename(e.path)
            };
            io.emit(automagic.fileChanged, data);
        });

To retrieve theio instance you can store it on initialisation var io = automagic.init() or use the public getter automagic.io

##Server setup complete! Continue with the automagic client

1.0.13

9 years ago

1.0.12

10 years ago

1.0.11

10 years ago

1.0.10

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

0.0.1

10 years ago