UNPKG

cluedin-widget

Version:

This project contains all the pages needed for browsing entities and searching them. The aim is to replace the CluedIn.Webapp project with this one when all the pages ( including the Admin page ) will be ported to REACT.

24 lines (20 loc) 714 B
var babelify = require( 'babelify' ); // Used to convert ES6 & JSX to ES5 var browserify = require( 'browserify' ); // Providers "require" support, CommonJS module.exports = { make: function( fileName, cb ) { var buffer = []; var bundle = browserify( fileName ) .transform( "babelify", { presets: [ "es2015", "react" ], "plugins": [ "transform-object-rest-spread" ] } ) .bundle(); bundle.on( 'data', function( buf ) { buffer.push( buf ); } ); bundle.on( 'end', function() { var files = Buffer.concat( buffer ).toString(); cb( null, files ); } ); } };