Skip to content

Commit

Permalink
fix(publish): make script generate correct package names
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffbcross authored and benlesh committed Dec 8, 2015
1 parent 79e9084 commit 10563d3
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions .make-packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,14 @@ var fs = require('fs');

delete pkg.scripts;

var cjsPkg = pkg;
var es6Pkg = pkg;

//override stuff for CJS package
cjsPkg.name = 'rxjs';
cjsPkg.main = 'Rx.js';
cjsPkg.typings = 'Rx.d.ts';

//override stuff for ES6 package
es6Pkg.name = 'rxjs-es6';
es6Pkg.main = 'Rx.js';
es6Pkg.typings = 'Rx.d.ts';
var cjsPkg = Object.assign({}, pkg, {
name: 'rxjs',
main: 'Rx.js',
typings: 'Rx.d.ts'
});
var es6Pkg = Object.assign({}, cjsPkg, {
name: 'rxjs-es6',
});

fs.writeFileSync('dist/cjs/package.json', JSON.stringify(cjsPkg, null, 2));
fs.writeFileSync('dist/cjs/LICENSE.txt', fs.readFileSync('./LICENSE.txt').toString());
Expand Down

0 comments on commit 10563d3

Please sign in to comment.