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
/* This file is included in the page running the app */ | |
(function() { | |
// create an instance of Socket.IO for listening | |
// to websocket messages | |
var socket = io(); | |
// listen for 'file-change' message | |
socket.on('file-change', function(msg) { | |
console.log('File changed: ' + msg.id); | |
// reload the browser to get the latest changes |
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
// some code here | |
// websocket connection for notifying browser | |
var io = require('socket.io')(http); | |
// some code here | |
var processFiles = function(callback) { | |
// some code here | |
md.pipe(JSONStream.stringify()) |
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 mdeps = require('module-deps'); | |
var browserPack = require('browser-pack'); | |
var JSONStream = require('JSONStream'); | |
var fs = require('fs'); | |
var path = require('path'); | |
// express - for serving our app | |
var express = require('express'); | |
var app = express(); | |
var http = require('http').Server(app); |
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
// require counter implementation from counter.js | |
var message = require('./message.js'); | |
document.querySelector('#message').innerText = message; |
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
webpackHotUpdate(0,{ | |
/***/ 78: | |
/***/ function(module, exports, __webpack_require__) { | |
exports = module.exports = __webpack_require__(79)(); | |
// imports | |
// module | |
exports.push([module.id, "body {\n background-color: yellow;\n}", ""]); | |
// exports | |
/***/ } | |
}) |
NewerOlder