Skip to content

Commit c40c9ed

Browse files
committed
add prepublish
1 parent ba52b74 commit c40c9ed

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

scripts/repl.js

+28
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,34 @@ function prepare() {
4343
e(`mv ./exports.js ${playground}`)
4444
}
4545

46+
function prepublish() {
47+
var mainPackageJson = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json')));
48+
var packageJson = JSON.stringify(
49+
{
50+
name: "reason-js-compiler",
51+
version: "0.0.1",
52+
license: mainPackageJson.license,
53+
description: mainPackageJson.description,
54+
repository: mainPackageJson.repository,
55+
author: mainPackageJson.author,
56+
maintainers: mainPackageJson.maintainers,
57+
bugs: mainPackageJson.bugs,
58+
homepage: mainPackageJson.homepage,
59+
main: "exports.js",
60+
},
61+
null,
62+
2
63+
);
64+
65+
fs.writeFileSync(
66+
path.join(__dirname, "..", "_release", "package.json"),
67+
packageJson,
68+
{
69+
encoding: "utf8"
70+
}
71+
);
72+
}
73+
4674

4775
prepare();
4876

0 commit comments

Comments
 (0)