You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2023/03/21 05:30:56 UTC

[incubator-opendal] branch main updated: chore(bindins/nodejs): Update README (#1709)

This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git


The following commit(s) were added to refs/heads/main by this push:
     new dc8fc9ac chore(bindins/nodejs): Update README (#1709)
dc8fc9ac is described below

commit dc8fc9acb7ab191a10fa70dd7b1e76494037e467
Author: Suyan <su...@gmail.com>
AuthorDate: Tue Mar 21 13:30:52 2023 +0800

    chore(bindins/nodejs): Update README (#1709)
    
    * chore(bindins/nodejs): Update README
    
    Signed-off-by: suyanhanx <su...@gmail.com>
    
    * remove services block
    
    Signed-off-by: suyanhanx <su...@gmail.com>
    
    ---------
    
    Signed-off-by: suyanhanx <su...@gmail.com>
---
 bindings/nodejs/README.md  | 23 +++++++++++++++++++----
 bindings/nodejs/index.d.ts |  1 +
 bindings/nodejs/src/lib.rs |  2 +-
 3 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/bindings/nodejs/README.md b/bindings/nodejs/README.md
index 8a7f3797..58d084ad 100644
--- a/bindings/nodejs/README.md
+++ b/bindings/nodejs/README.md
@@ -10,7 +10,7 @@ npm install opendal
 
 ## Docs
 
-see [index.d.ts](./index.d.ts)
+See our documentations on [opendal.apache.org](https://opendal.apache.org/docs/nodejs/).
 
 ## Usage
 
@@ -29,7 +29,7 @@ async function main() {
 main();
 ```
 
-## Test or Contributing
+## Contributing
 
 - Install latest `Rust`
 - Install `Node.js@10+` which fully supported `Node-API`
@@ -42,14 +42,29 @@ corepack enable
 
 `corepack` is distributed with Node.js, so you do not need to specifically look for a way to install it.
 
-# Build Node.js bindings
+
+### Build
 
 ```bash
+# Install dependencies.
 yarn
+# Build from source.
 yarn build
+# Build from source with debug info.
+yarn build:debug
+```
+
+### Test
+
+```bash
 yarn test
 ```
 
+We use [`Cucumber`](https://cucumber.io/) for behavior testing. Refer to [here](https://cucumber.io/docs/guides/overview/) for more information about `Cucumber`.
+
+
+
 ## License
 
-[Apache v2.0](https://www.apache.org/licenses/LICENSE-2.0)
+Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
+
diff --git a/bindings/nodejs/index.d.ts b/bindings/nodejs/index.d.ts
index c8d4171f..4516d193 100644
--- a/bindings/nodejs/index.d.ts
+++ b/bindings/nodejs/index.d.ts
@@ -66,6 +66,7 @@ export class Operator {
   listSync(path: string): BlockingLister
 }
 export class Entry {
+  /** Return the path of this entry. */
   path(): string
 }
 export class Metadata {
diff --git a/bindings/nodejs/src/lib.rs b/bindings/nodejs/src/lib.rs
index 7748d3a1..2f062cdb 100644
--- a/bindings/nodejs/src/lib.rs
+++ b/bindings/nodejs/src/lib.rs
@@ -213,7 +213,7 @@ pub struct Entry(opendal::Entry);
 
 #[napi]
 impl Entry {
-    // Return the path of this entry.
+    /// Return the path of this entry.
     #[napi]
     pub fn path(&self) -> String {
         self.0.path().to_string()