Use UMD from npm package 'eventemitter3' instead of patching it ourselves to support AMD
MODIFY
build-config/RequireJS_config_common.js
build-config/RequireJS_config_common.js
@@ -58,8 +58,7 @@ require.config({
process._RJS_rootDir(1) + '/node_modules/domReady/domReady',
eventEmitter:
- process._RJS_rootDir(1) + '/node_modules/eventemitter3/_rjs/index',
- //see prepare:patch npm build task (converts CommonJS to AMD => define(function(require, exports, module) { .... });)
+ process._RJS_rootDir(1) + '/node_modules/eventemitter3/umd/eventemitter3.min',
"es6-collections":
process._RJS_rootDir(1) + '/node_modules/es6-collections/index',

MODIFY
package.cson
package.cson
@@ -198,9 +198,6 @@ scripts:
#=====================
'prepare:local:common': '
- npm run
- prepare:patch
- &&
node
readium-cfi-js/readium-build-tools/gitHubForksUpdater.js
'
@@ -229,17 +226,6 @@ scripts:
ls
'
-#=====================
- 'prepare:patch': '
-
- npm run rimraf
- node_modules/eventemitter3/_rjs/**
- &&
- node readium-cfi-js/node_modules/requirejs/bin/r.js -convert
- node_modules/eventemitter3/
- node_modules/eventemitter3/_rjs/
- '
-
#=====================
clean: '

MODIFY
package.json
package.json
"prepare:local": "(npm outdated || echo outdated) && npm install --only=prod && npm install --only=dev && npm run prepare:local:common",
"prepare:yarn:all": "yarn run prepare:yarn:submodule && yarn run prepare:yarn:local",
"prepare:yarn:local": "(yarn outdated || echo outdated) && yarn install && yarn run prepare:local:common",
- "prepare:local:common": "npm run prepare:patch && node readium-cfi-js/readium-build-tools/gitHubForksUpdater.js",
+ "prepare:local:common": "node readium-cfi-js/readium-build-tools/gitHubForksUpdater.js",
"prepare:submodule": "cd readium-cfi-js && npm run prepare:all && cd .. && ls",
"prepare:yarn:submodule": "cd readium-cfi-js && yarn run prepare:yarn:all && cd .. && ls",
- "prepare:patch": "node ./readium-cfi-js/node_modules/rimraf/bin.js node_modules/eventemitter3/_rjs/** && node readium-cfi-js/node_modules/requirejs/bin/r.js -convert node_modules/eventemitter3/ node_modules/eventemitter3/_rjs/",
"clean": "(yarn --version || echo noyarn) && node --version && npm --version && node ./readium-cfi-js/node_modules/rimraf/bin.js build-output/* && node ./readium-cfi-js/node_modules/rimraf/bin.js api-docs/*",
"apidocs": "node ./readium-cfi-js/node_modules/yuidocjs/lib/cli.js -N -C -c yuidocs.json",
"prebuild": "npm run clean",

Use UMD from npm package 'eventemitter3' instead of patching it ourselves to support AMD