Based on OpenLayers 3 Browserify Tutorial.
For a one-time build run:
npm run build
If you want to make changes and have the project auto build run:
npm run start
// Pass the path to `ol3-layerswitcher.js` minus the extension to `require`
// which will return the constructor
var LayerSwitcher = require('../../src/ol3-layerswitcher');
// Create an instance
var layerSwitcher = new LayerSwitcher();
// Add to a `ol.Map` instance as normal
map.addControl(layerSwitcher);