Skip to content

Commit

Permalink
feat: follow Angular package format v4.0
Browse files Browse the repository at this point in the history
Fixes #30
  • Loading branch information
hotforfeature committed Jul 3, 2017
1 parent 7f98d70 commit f69956d
Show file tree
Hide file tree
Showing 82 changed files with 18,514 additions and 7,849 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# compiled output
/bundles
/lib
/dist
/test/build
/out-tsc

# dependencies
/node_modules
Expand Down
11 changes: 0 additions & 11 deletions .npmignore

This file was deleted.

23 changes: 23 additions & 0 deletions cp-package.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const path = require('path');
const fs = require('fs');

const main = require('./package.json');

const json = require(path.resolve(__dirname, process.argv[2]));

const exclude = [
'devDependencies',
'scripts',
'config',
'private'
];

Object.keys(main).forEach(key => {
if (exclude.indexOf(key) === -1) {
if (!json[key]) {
json[key] = main[key];
}
}
});

fs.writeFileSync(path.resolve(__dirname, process.argv[3]), JSON.stringify(json, null, 2), 'utf8');
Loading

0 comments on commit f69956d

Please sign in to comment.