Remove secondary package.json as a build artifactt since it doesn't make sense anymore
DELETE
build-output/_umd-bundle/package.json
-{
- "/*": "----------------------------------------------------------------------------",
- "..": "This package.json (JSON) is automatically generated from package.cson (CSON)",
- ".-": "DO NOT invoke 'npm init' or 'npm install --save' ('--save-dev' / '--save-optional')",
- "._": "as this would overwrite / update the JSON, not the master CSON!",
- "*/": "----------------------------------------------------------------------------",
- "name": "readium-shared-js",
- "version": "0.30.0-alpha",
- "engines": {
- "node": ">=4",
- "npm": ">=2",
- "yarn": ">=0.23"
- },
- "description": "Readium - shared javascript module",
- "keywords": [
- "readium",
- "epub",
- "epub3"
- ],
- "author": {
- "name": "Readium (Daniel Weck)",
- "email": "daniel.weck@gmail.com",
- "url": "http://github.com/readium"
- },
- "license": "BSD-3-Clause",
- "licenses": [
- {
- "type": "BSD-3-Clause",
- "url": "http://opensource.org/licenses/BSD-3-Clause"
- }
- ],
- "homepage": "http://github.com/readium/readium-shared-js",
- "bugs": {
- "url": "http://github.com/readium/readium-shared-js/issues",
- "email": "daniel.weck@gmail.com"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/readium/readium-shared-js.git"
- },
- "main": "readium-shared-js.js"
-}
\ No newline at end of file

MODIFY
readium-build-tools/RequireJS_function_umd-bundle_complete.js
readium-build-tools/RequireJS_function_umd-bundle_complete.js
@@ -19,14 +19,6 @@ function (data) {
var outputFileName = path.basename(data.path);
var rootPath = path.resolve(outputPath, '../../');
- var packageJson = module.require(path.join(rootPath, 'package.json'));
- delete packageJson.files;
- delete packageJson.dependencies;
- delete packageJson.devDependencies;
- delete packageJson.scripts;
-
- packageJson.main = outputFileName;
-
var configDir = process.cwd()
+ "/"
+ process._RJS_Path_RelCwd__ConfigDir;
@@ -46,5 +38,5 @@ function (data) {
fs.writeFileSync(outputFile, cleanedCode);
fs.unlinkSync(outputFile + '.map'); // Delete the source map, as it is incompatible :(
- fs.writeFileSync(path.join(outputPath, 'package.json'), JSON.stringify(packageJson, null, ' '));
+ console.log("done");
}

Remove secondary package.json as a build artifactt since it doesn't make sense anymore