{"id":15393266,"url":"https://github.com/doubleu23/readdir-loader","last_synced_at":"2025-03-22T20:26:25.828Z","repository":{"id":57348657,"uuid":"71161191","full_name":"DoubleU23/readdir-loader","owner":"DoubleU23","description":"webpack loader - load all files in given dir","archived":false,"fork":false,"pushed_at":"2020-04-02T21:23:27.000Z","size":22,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-28T00:26:37.428Z","etag":null,"topics":["filesystem-interaction","webpack-loader"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DoubleU23.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-17T17:00:07.000Z","updated_at":"2017-09-27T16:15:27.000Z","dependencies_parsed_at":"2022-08-24T18:00:41.744Z","dependency_job_id":null,"html_url":"https://github.com/DoubleU23/readdir-loader","commit_stats":null,"previous_names":["doubleu23/dirfiles-loader"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoubleU23%2Freaddir-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoubleU23%2Freaddir-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoubleU23%2Freaddir-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoubleU23%2Freaddir-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DoubleU23","download_url":"https://codeload.github.com/DoubleU23/readdir-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245016561,"owners_count":20547631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["filesystem-interaction","webpack-loader"],"created_at":"2024-10-01T15:18:32.777Z","updated_at":"2025-03-22T20:26:25.805Z","avatar_url":"https://github.com/DoubleU23.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# readdir-loader\n\u003e load all files in given dir\n\n[![dependencies Status](https://david-dm.org/doubleu23/readdir-loader/status.svg)](https://david-dm.org/doubleu23/readdir-loader)\n[![devDependencies Status](https://david-dm.org/doubleu23/readdir-loader/dev-status.svg)](https://david-dm.org/doubleu23/readdir-loader?type=dev)\n[![Known Vulnerabilities](https://snyk.io/test/github/doubleu23/readdir-loader/badge.svg)](https://snyk.io/test/github/doubleu23/readdir-loader)\n\n### basic information\n* webpack loader\n* read dir's content via 'dive' pckg  \n    * files and/or directories\n    * recursive (if you want)\n\n### usage\n**targetDir tree**  \n├── index.js  \n├── LICENSE  \n├── node_modules  \n├── package.json  \n├── README.md  \n└── test\n```JavaScript\nconst subdirs = require('readdir-loader!./targetDir')\nconsole.log(subdirs) // ['node_modules', 'test']\n\nconst subdirs = require('readdir-loader?dirs=false\u0026files=true!./targetDir')\nconsole.log(subdirs) // ['index.js', 'LICENSE', 'package.json', 'README.md']\n```\n**CAUTION**  \nwebpack-loaders are limited to targeting files  \n**to enable the loader** fetching the dir just add an file in the dir named \"index(.js)\"\n\n### options\n| name | type | description | default |\n|------|------|-------------|-------------|\n| basename | bool | return basename? | true |\n| dirs | bool | include dirs? | true |\n| files | bool | include files? | false |\n| recursive | bool | search recursive? | false |\n\n### issues\n\n\n### to be done  \n* `npm publish`\n* optimize options\n* tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoubleu23%2Freaddir-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoubleu23%2Freaddir-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoubleu23%2Freaddir-loader/lists"}