Skip to content

Commit

Permalink
fix(build): Add package.json files for deep paths
Browse files Browse the repository at this point in the history
Closes #880
  • Loading branch information
cartant authored and davideast committed Apr 4, 2017
1 parent 750737c commit cd5f2d1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "main": "../bundles/angularfire2.umd.js" }
1 change: 1 addition & 0 deletions src/auth/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "main": "../bundles/angularfire2.umd.js" }
1 change: 1 addition & 0 deletions src/database/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "main": "../bundles/angularfire2.umd.js" }
7 changes: 7 additions & 0 deletions tools/rewrite-published-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@ delete srcPackage.dependencies;
var outPackage = Object.assign({}, srcPackage, { peerDependencies });

fs.writeFileSync('./dist/package.json', JSON.stringify(outPackage, null, 2));

// It's also necessary to copy any deep-path package.json files.
// See https://github.com/angular/angularfire2/issues/880

['app', 'auth', 'database'].forEach(dir => {
fs.writeFileSync(`./dist/${dir}/package.json`, fs.readFileSync(`./src/${dir}/package.json`));
});

0 comments on commit cd5f2d1

Please sign in to comment.