Skip to content

Commit

Permalink
Merge pull request #30 from milvus-io/feat/fix-build
Browse files Browse the repository at this point in the history
fix build
  • Loading branch information
shanghaikid authored Aug 4, 2021
2 parents c69ca8c + 4591297 commit 46b8f57
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,17 @@ function copyFolderRecursiveSync(source, target) {
}
}

function removeDistPackageJson(source) {
try {
fs.unlinkSync(source);
//file removed
} catch (err) {
console.error(err);
}
}

copyFolderRecursiveSync("./grpc-proto", "./dist");

// if dist has package.json need delete it.
// otherwise npm publish will use package.json inside dist then will missing files.
removeDistPackageJson("./dist/package.json");
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@zilliz/milvus2-sdk-node",
"author": "[email protected]",
"version": "1.0.8",
"version": "1.0.9",
"main": "dist/milvus",
"files": [
"dist"
Expand Down

0 comments on commit 46b8f57

Please sign in to comment.