chore: set up test and build infrastructure

This commit is contained in:
vsavkin
2016-05-20 13:22:57 -07:00
parent c9c81e1fbc
commit f57df3cf8a
12 changed files with 324 additions and 0 deletions

View File

@ -0,0 +1,17 @@
/**
* Rewrite the package.json that gets published to npm.
* * Change main to point to router.js instead of dist/router.js
* * Change angular2 to be a peer dependency
*/
var fs = require('fs');
var srcPackage = require('../package.json');
var [MAIN, JSNEXT_MAIN] = ['main', 'jsnext:main'].map(k => srcPackage[k].replace('/dist/', '/'));
var outPackage = Object.assign({}, srcPackage, {
peerDependencies: srcPackage.dependencies,
main: MAIN,
typings: "router.d.ts",
"jsnext:main": JSNEXT_MAIN,
dependencies: undefined
});
fs.writeFileSync('./dist/package.json', JSON.stringify(outPackage, null, 2));