{"id":16185492,"url":"https://github.com/patrickhulce/generate-export-aliases","last_synced_at":"2026-03-04T15:31:48.588Z","repository":{"id":48000364,"uuid":"66971070","full_name":"patrickhulce/generate-export-aliases","owner":"patrickhulce","description":"Makes requiring files deep in your node module easy and safe from refactoring","archived":false,"fork":false,"pushed_at":"2023-05-12T22:06:12.000Z","size":678,"stargazers_count":4,"open_issues_count":17,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-26T07:48:03.961Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/patrickhulce.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-30T19:27:34.000Z","updated_at":"2022-06-29T02:32:43.000Z","dependencies_parsed_at":"2024-06-19T05:24:00.973Z","dependency_job_id":"b0d10bea-f114-41c9-b3c5-e5c03484b4c6","html_url":"https://github.com/patrickhulce/generate-export-aliases","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/patrickhulce/generate-export-aliases","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickhulce%2Fgenerate-export-aliases","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickhulce%2Fgenerate-export-aliases/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickhulce%2Fgenerate-export-aliases/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickhulce%2Fgenerate-export-aliases/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrickhulce","download_url":"https://codeload.github.com/patrickhulce/generate-export-aliases/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickhulce%2Fgenerate-export-aliases/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30084967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T13:22:36.021Z","status":"ssl_error","status_checked_at":"2026-03-04T13:20:45.750Z","response_time":59,"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":[],"created_at":"2024-10-10T07:14:27.306Z","updated_at":"2026-03-04T15:31:48.564Z","avatar_url":"https://github.com/patrickhulce.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# generate-export-aliases\n\n[![NPM Package](https://badge.fury.io/js/generate-export-aliases.svg)](https://www.npmjs.com/package/generate-export-aliases)\n[![Build Status](https://travis-ci.org/patrickhulce/generate-export-aliases.svg?branch=master)](https://travis-ci.org/patrickhulce/generate-export-aliases)\n[![Coverage Status](https://coveralls.io/repos/github/patrickhulce/generate-export-aliases/badge.svg?branch=master)](https://coveralls.io/github/patrickhulce/generate-export-aliases?branch=master)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n[![Dependencies](https://david-dm.org/patrickhulce/generate-export-aliases.svg)](https://david-dm.org/patrickhulce/generate-export-aliases)\n\nGenerates additional files to make requiring files deep in your node module easy and safe from refactoring.\n\n## Usage\n\nSave `generate-export-aliases` as a dev dependency in your `package.json`.\n\n```sh\nnpm i -D generate-export-aliases\n```\n\nAdd a prepublish hook and the exports you wish to alias to the `config` section of your `package.json` under `exportAliases`.\nFor example, if you wanted to alias the `myHelper.js` file in the following directory structure...\n\n#### Example Folder Structure\n\n```\n├── LICENSE\n├── README.md\n├── package.json\n├── lib\n│   ├── fileA.js\n│   ├── fileB.js\n│   ├── fileC.js\n│   └── shared\n│       ├── myHelper.js\n│       └── otherHelper.js\n```\n\n#### `package.json`\n\n```json\n{\n  \"name\": \"my-fantastic-library\",\n  \"scripts\": {\n    \"prepublish\": \"generate-export-aliases\"\n  },\n  \"config\": {\n    \"exportAliases\": {\n      \"exposed-helper\": \"./lib/shared/myHelper.js\"\n    }\n  }\n}\n```\n\n#### Requiring Your Alias\n\n```js\nconst exposedHelper = require('my-fantastic-library/exposed-helper')\nconst exposedHelperOriginal = require('my-fantastic-library/lib/shared/myHelper.js')\nexposedHelper === exposedHelperOriginal // true\n```\n\n## Inspiration\n\n[lodash](https://github.com/lodash/lodash)'s build process\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickhulce%2Fgenerate-export-aliases","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrickhulce%2Fgenerate-export-aliases","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickhulce%2Fgenerate-export-aliases/lists"}