Skip to content

Commit 439a2f3

Browse files
committed
fix(publish): copy readme and license, remove scripts
This change makes sure the README.md and LICENSE.txt files are included in the CJS and ES6 distributions. The change also removes all scripts from the npm package, since no scripts are expectd to be run when installed by end-users. Fixes #845
1 parent 0574bd9 commit 439a2f3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.make-packages.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
var pkg = require('./package.json');
22
var fs = require('fs');
33

4+
delete pkg.scripts;
5+
46
var cjsPkg = pkg;
57
var es6Pkg = pkg;
68

@@ -15,4 +17,9 @@ es6Pkg.main = 'Rx.js';
1517
es6Pkg.typings = 'Rx.d.ts';
1618

1719
fs.writeFileSync('dist/cjs/package.json', JSON.stringify(cjsPkg, null, 2));
18-
fs.writeFileSync('dist/es6/package.json', JSON.stringify(es6Pkg, null, 2));
20+
fs.writeFileSync('dist/cjs/LICENSE.txt', fs.readFileSync('./LICENSE.txt').toString());
21+
fs.writeFileSync('dist/cjs/README.md', fs.readFileSync('./README.md').toString());
22+
23+
fs.writeFileSync('dist/es6/package.json', JSON.stringify(es6Pkg, null, 2));
24+
fs.writeFileSync('dist/es6/LICENSE.txt', fs.readFileSync('./LICENSE.txt').toString());
25+
fs.writeFileSync('dist/es6/README.md', fs.readFileSync('./README.md').toString());

0 commit comments

Comments
 (0)