{"id":25620783,"url":"https://github.com/codewell/simple-includer","last_synced_at":"2025-08-12T00:10:52.416Z","repository":{"id":42959967,"uuid":"229044652","full_name":"codewell/simple-includer","owner":"codewell","description":"Simply load all files from a directory","archived":false,"fork":false,"pushed_at":"2023-01-05T03:20:42.000Z","size":1001,"stargazers_count":0,"open_issues_count":10,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-22T07:31:50.297Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codewell.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":"2019-12-19T11:54:53.000Z","updated_at":"2021-04-02T10:32:33.000Z","dependencies_parsed_at":"2023-02-03T08:16:11.946Z","dependency_job_id":null,"html_url":"https://github.com/codewell/simple-includer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codewell/simple-includer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewell%2Fsimple-includer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewell%2Fsimple-includer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewell%2Fsimple-includer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewell%2Fsimple-includer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codewell","download_url":"https://codeload.github.com/codewell/simple-includer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewell%2Fsimple-includer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269976881,"owners_count":24506483,"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","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-02-22T07:28:02.238Z","updated_at":"2025-08-12T00:10:52.378Z","avatar_url":"https://github.com/codewell.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @codewell/simple-includer\nSimply load all files from a directory assuming that they all export one funtion that takes the same constructor object as input.\n\n## Examples\n```JavaScript\n// Example file to be included\nmodule.exports = (constructor) =\u003e {\n    // Do something\n};\n```\n\n### Example include api endpoints\n```JavaScript\n// index.js\nconst path = requrie('path');\nconst express = require('express');\nconst simpleIncluder = require('simple-includer');\nconst app = express();\n\nsimpleIncluder({\n    path: path.resolve(__dirname, './api'),\n    constructor: { app },\n})\n```\n\n```JavaScript\n// api/endpoint1.js\n\nmodule.exports = ({app}) =\u003e {\n    app.get('/', (req, res) =\u003e {\n        // Do some magic\n    })\n}\n```\n\n## Installation\n```\nnpm install @codewell/simple-includer\n```\n\n## Basic Usage\n```JavaScript\nimport simpleIncluder from '@codewell/simple-includer';\n\nsimpleIncluder({\n    // Path to directory to include\n    path: './someDir', \n\n    // All directory- filenames that \n    // should be excluded\n    exclude: ['filename'], \n    \n    // Constructor object the included \n    // function should be called with\n    constructor: {foo: 'bar'}, with\n    \n    // If the included files should be logged\n    verbose: true // or false\n});\n```\n\n## Testing\n**Functions**  \nWrite tests in the `tests/` folder\n\n**Package**\n1. Make a dry reslease with `npm run dry-release`. This will generate a file `packagename-x.x.x.tgz`.\n2. Install the package in your other application/package by running `npm install path/to/packagename-x.x.x.tgz`.\n3. Import and use as usual in you application/package.\n\n## Releasing\n1. Run `npm run release`\n2. Push the code to github\n3. Update package version \n    - `npm version patch` updates `x.x.1` -\u003e `x.x.2`\n    - `npm version minor` updates `x.1.x` -\u003e `x.2.x`\n    - `npm version major` updates `1.x.x` -\u003e `2.x.x`\n4. Run `npm publish --access public`\n\n## Issues\nPlease help by posting issues here on github\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewell%2Fsimple-includer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodewell%2Fsimple-includer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewell%2Fsimple-includer/lists"}