Fix some build script issues
* Copy README to dist * Fix strings in prepublishOnlymaster
parent
fea34d4e70
commit
89c84e5ee0
|
@ -200,7 +200,7 @@ async function createPackageJson() {
|
||||||
delete pkg.devDependencies;
|
delete pkg.devDependencies;
|
||||||
pkg.scripts = {
|
pkg.scripts = {
|
||||||
prepublishOnly:
|
prepublishOnly:
|
||||||
'node -e "assert.equal(require(".").version, require("..").version)"'
|
"node -e \"assert.equal(require('.').version, require('..').version)\""
|
||||||
};
|
};
|
||||||
await util.writeJson("dist/package.json", pkg);
|
await util.writeJson("dist/package.json", pkg);
|
||||||
}
|
}
|
||||||
|
@ -213,6 +213,8 @@ async function run() {
|
||||||
}
|
}
|
||||||
|
|
||||||
await createPackageJson();
|
await createPackageJson();
|
||||||
|
|
||||||
|
await util.copyFile("./README.md", "./dist/README.md");
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|
|
@ -17,8 +17,14 @@ function writeJson(file, content) {
|
||||||
return writeFile(file, content);
|
return writeFile(file, content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function copyFile(from, to) {
|
||||||
|
const data = await readFile(from);
|
||||||
|
return writeFile(to, data);
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
asyncRimRaf: promisify(rimraf),
|
asyncRimRaf: promisify(rimraf),
|
||||||
readJson,
|
readJson,
|
||||||
writeJson
|
writeJson,
|
||||||
|
copyFile
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue