https://github.com/thecodeorigin/autorequire.js
Some helper function that can help you requiring all files in a directory (inspired by nuxt.js). Also it can help you retrieve the directory tree
https://github.com/thecodeorigin/autorequire.js
Last synced: 10 months ago
JSON representation
Some helper function that can help you requiring all files in a directory (inspired by nuxt.js). Also it can help you retrieve the directory tree
- Host: GitHub
- URL: https://github.com/thecodeorigin/autorequire.js
- Owner: thecodeorigin
- Created: 2020-10-07T08:11:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-30T14:50:31.000Z (over 4 years ago)
- Last Synced: 2023-03-09T23:32:17.294Z (almost 3 years ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# autoRequire.js
Some helper function that can help you requiring all files in a directory (inspired by nuxt.js). Also it can help you retrieve the directory tree
```
// Directory:
// folder1
// --folder2
// ----somefile1.js
// ----somefile2.js
// --folder3
// ----somefile3.js
// ----somefile4.json
// Goal:
// Achieve an object like so :
// {
// folder2: {
// somefile1: {
// somefunction: [Function aFunction] // You can call this function if you require it
// },
// somefile2: {},
// },
// folder3: {
// somefile3: {},
// somefile4: {
// something: "Something in the json file"
// },
// }
// }
```