{"id":15043176,"url":"https://github.com/shanhaichik/webpack-require-loader","last_synced_at":"2026-03-12T15:05:57.517Z","repository":{"id":57354367,"uuid":"47390257","full_name":"shanhaichik/webpack-require-loader","owner":"shanhaichik","description":"Require a whole directory of trees in bulk","archived":false,"fork":false,"pushed_at":"2017-09-05T10:34:22.000Z","size":23,"stargazers_count":23,"open_issues_count":1,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T15:06:15.764Z","etag":null,"topics":["loader","webpack","webpack-loader","webpack2"],"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/shanhaichik.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":"2015-12-04T08:05:55.000Z","updated_at":"2024-11-25T05:47:39.000Z","dependencies_parsed_at":"2022-09-12T04:01:42.742Z","dependency_job_id":null,"html_url":"https://github.com/shanhaichik/webpack-require-loader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shanhaichik/webpack-require-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shanhaichik%2Fwebpack-require-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shanhaichik%2Fwebpack-require-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shanhaichik%2Fwebpack-require-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shanhaichik%2Fwebpack-require-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shanhaichik","download_url":"https://codeload.github.com/shanhaichik/webpack-require-loader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shanhaichik%2Fwebpack-require-loader/sbom","scorecard":{"id":816021,"data":{"date":"2025-08-11","repo":{"name":"github.com/shanhaichik/webpack-require-loader","commit":"9f6107e73a5360c2bc9b99614ac21c80b7dbbf04"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"name":"Code-Review","score":2,"reason":"Found 6/21 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 15 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T14:17:11.065Z","repository_id":57354367,"created_at":"2025-08-23T14:17:11.065Z","updated_at":"2025-08-23T14:17:11.065Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30429391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T14:34:45.044Z","status":"ssl_error","status_checked_at":"2026-03-12T14:09:33.793Z","response_time":114,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["loader","webpack","webpack-loader","webpack2"],"created_at":"2024-09-24T20:48:40.025Z","updated_at":"2026-03-12T15:05:57.498Z","avatar_url":"https://github.com/shanhaichik.png","language":"JavaScript","funding_links":["https://www.paypal.me/shanhaichik"],"categories":[],"sub_categories":[],"readme":"# webpack-require-loader\nLoader receives a file tree from a template and import them with the necessary parameters settings.\n\nIt can be used to import any kind of files. You can use it in javascript files or style files. Works great with ng-include and ng-cache when developing angular applications.\n\n[Use with angular](https://github.com/shanhaichik/webpack-require-loader/blob/master/ANGULAR.md)\n\n[Help author (donate)](https://www.paypal.me/shanhaichik)\n## Support Webpack 1.x and Webpack 2.x\n\n## Install\n\n`npm i required-loader --save-dev`\n\n## Simple Usage\nAdd in your code comment:\n```js\n/* input string in code */\n//@require \"./modules/**/index.js\"\n\n/* output */\nrequire('./modules/one/index.js');\nrequire('./modules/two/index.js');\nrequire('./modules/three/index.js');\n\n```\n\n## Usage with import props\nAdd in your code comment:\n```js\n//@require \"./modules/**/index.js?import[]=angular,go={hello:'world'}\"\n```\n* If the import parameters are set in the webpack.config.js file and in @require comment,\nthey both will be imported into the included files\n\n## More examples\n```js\n//@require \"./modules/**/index.js?import[]=angular,import[]=$=jquery,go={hello:'world'}\"\n\n//@require \"./**/!(index|config|run)*\"\n\n//@require \"./**/*\"\n\n//@require \"./**/*.html\"\n```\n\n## Usage in CSS/SCSS/STYL/LESS files\n```css\n/* input string in style file */\n@require \"./**/!(app|bootstrap).css\";\n@require \"./**/*.less\";\n@require \"./**/*.scss\";\n@require \"./**/*.styl\";\n/* output */\n@import 'style/header.css';\n@import 'style/layout.css';\n@import 'style/menus.css';\n```\n\n### webpack.config.js\n## JS loader\n```js\n{\ntest: /\\.js$/,\n  loader: 'required?import[]=angular',\n}\n\nOR\n\nloaders: [\"ng-annotate\",\"babel\",\"required?import[]=angular,params={ip:'0.0.0.0'}\"]\n```\n\n## CSS loaders\n```js\n{\ntest: /\\.css$/,\n  loader: 'required',\n}\n\nOR\n\nloader: ExtractTextPlugin.extract(\"style\",\"css?sourceMap!postcss!required\")\n```\n\n### Params\n\nParam | Description\n------------|-------\n`import` | `import modules in required scripts`\n`params` | `import params in required scripts. It can be any variable name. Params in loader === var params = {ip:'0.0.0.0'} in file witch require`\n\nThe following characters have special magic meaning when used in a\npath portion:\n\n* `*` Matches 0 or more characters in a single path portion\n* `?` Matches 1 character\n* `[...]` Matches a range of characters, similar to a RegExp range.\nIf the first character of the range is `!` or `^` then it matches\nany character not in the range.\n* `!(pattern|pattern|pattern)` Matches anything that does not match\nany of the patterns provided.\n* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the\npatterns provided.\n* `+(pattern|pattern|pattern)` Matches one or more occurrences of the\npatterns provided.\n* `*(a|b|c)` Matches zero or more occurrences of the patterns provided\n* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns\nprovided\n\n## If you find a mistake, don't be lazy, write. Thank you.\n## Pull request welcome\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshanhaichik%2Fwebpack-require-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshanhaichik%2Fwebpack-require-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshanhaichik%2Fwebpack-require-loader/lists"}