mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
50 lines
745 B
JavaScript
50 lines
745 B
JavaScript
|
|
/**
|
|
* Module dependencies.
|
|
*/
|
|
|
|
var webpack = require('webpack');
|
|
var concat = require('concat-stream');
|
|
var path = require.resolve('../');
|
|
|
|
/**
|
|
* Module exports.
|
|
*/
|
|
|
|
module.exports = build;
|
|
|
|
/**
|
|
* Make the build.
|
|
*
|
|
* @api public
|
|
*/
|
|
|
|
|
|
function build(fn){
|
|
var bundle = webpack({
|
|
entry: "../index.js",
|
|
output: {
|
|
path: "../",
|
|
filename: "engine.io.js"
|
|
}
|
|
}, function(err, stats) {
|
|
if (err) {
|
|
fn(err);
|
|
} else{
|
|
fn(null, stats.toString({ source: true }));
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Populates `global`.
|
|
*
|
|
* @api private
|
|
*/
|
|
|
|
function glob(){
|
|
return 'typeof self !== "undefined" ? self : '
|
|
+ 'typeof window !== "undefined" ? window : '
|
|
+ 'typeof global !== "undefined" ? global : {}';
|
|
}
|