Skip to content

Commit

Permalink
Publish watcher from sub-directory so binding.gyp is excluded
Browse files Browse the repository at this point in the history
  • Loading branch information
devongovett committed Feb 23, 2024
1 parent cc904f8 commit 8dfd994
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,3 @@ jobs:
npm publish;
cd ../..;
done
echo "Publishing @parcel/watcher..."
npm publish
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@parcel/watcher",
"version": "2.4.0",
"version": "2.4.1",
"main": "index.js",
"types": "index.d.ts",
"repository": {
Expand All @@ -22,7 +22,8 @@
"index.d.ts",
"wrapper.js",
"package.json",
"README.md"
"README.md",
"LICENSE"
],
"scripts": {
"prebuild": "prebuildify --napi --strip --tag-libc",
Expand Down
8 changes: 7 additions & 1 deletion scripts/build-npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,14 @@ for (let triple of triples) {
buildNode(triple, t);
}

try {
fs.mkdirSync(dir + '/npm/watcher');
} catch (err) { }
for (let file of pkg.files) {
fs.copyFileSync(`${dir}/${file}`, `npm/watcher/${file}`);
}
pkg.optionalDependencies = optionalDependencies;
fs.writeFileSync(`${dir}/package.json`, JSON.stringify(pkg, false, 2) + '\n');
fs.writeFileSync(`${dir}/npm/watcher/package.json`, JSON.stringify(pkg, false, 2) + '\n');

function buildNode(triple, t) {
let pkg2 = { ...pkg };
Expand Down

0 comments on commit 8dfd994

Please sign in to comment.