diff --git a/README.md b/README.md index 5fbada4..655d235 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ yarn add import-directories ## Usage +### Import Directory + ```js import { importDirectory } from "import-directories"; @@ -42,7 +44,7 @@ import { importDirectory } from "import-directories"; const foo = await importDirectory("./foo", { keepPathOnKey: true }); console.log(foo); -// => { "/home/user/foo/bar.js": { foobar: "arboof" } } +// => { "/home/user/foo/bar.js": { foobar: "raboof" } } ``` #### Prefix Key @@ -53,8 +55,12 @@ import { importDirectory } from "import-directories"; const foo = await importDirectory("./foo", { prefixKey: "/foobar-app" }); console.log(foo); -// => { +// => { // "/foobar-app/foo.js": { foo: "bar" } // "/foobar-app/bar.js": { bar: "foo" } // } ``` + +## Related + +- [express-router-helpers](https://github.com/iswilljr/express-router-helpers) - create your route handlers easier and autoload routes diff --git a/package.json b/package.json index d90577f..5e84003 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "import-directories", - "version": "0.0.2", + "version": "0.0.3", "description": "recursively imports all files in a directory", "license": "MIT", "author": "iswilljr ",