This describes how to build enzyme as a UMD (Universal Module Definition) module so it can be used in systems with legacy module loaders like RequireJS.
Browserify with the --standalone
option will be used to build the standalone Enzyme UMD module. This is a good post describing Browserify's --standalone
option: http://www.forbeslindesay.co.uk/post/46324645400/standalone-browserify-builds.
- Install npm dependencies
npm install --save-dev browserify
npm install --save-dev enzyme
npm install --save-dev react