{"id":26356534,"url":"https://github.com/alexfigliolia/react-native-path-aliases","last_synced_at":"2025-03-16T13:32:00.980Z","repository":{"id":277694908,"uuid":"933198665","full_name":"alexfigliolia/react-native-path-aliases","owner":"alexfigliolia","description":"Path \u0026 Package alias generation for react native applications (or any application using both babel and typescript)","archived":false,"fork":false,"pushed_at":"2025-02-15T13:13:14.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T14:22:10.055Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexfigliolia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-02-15T11:47:15.000Z","updated_at":"2025-02-15T13:13:18.000Z","dependencies_parsed_at":"2025-02-15T14:22:17.626Z","dependency_job_id":"77f27951-3323-4bfa-b88c-cfb40108be22","html_url":"https://github.com/alexfigliolia/react-native-path-aliases","commit_stats":null,"previous_names":["alexfigliolia/react-native-path-aliases"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexfigliolia%2Freact-native-path-aliases","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexfigliolia%2Freact-native-path-aliases/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexfigliolia%2Freact-native-path-aliases/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexfigliolia%2Freact-native-path-aliases/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexfigliolia","download_url":"https://codeload.github.com/alexfigliolia/react-native-path-aliases/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243875062,"owners_count":20361939,"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":[],"created_at":"2025-03-16T13:30:56.467Z","updated_at":"2025-03-16T13:32:00.972Z","avatar_url":"https://github.com/alexfigliolia.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Native Path Aliases\nA CLI to manage your package/path aliases in react native apps (or any app using babel and typescript). When adding new packages or aliases to your app, you can synchronize babel's and typescript's path definition by running `react-native-path-aliases --name \u003cmy-package-name\u003e`.\n\n### Installation\n\n```bash\nyarn add -D react-native-path-aliases\n# or\nnpm i -D react-native-path-aliases\n```\n\n### Basic Usage\nIf both your `tsconfig.json` file and and `babel.config.js` file are at the root of your project, you can run:\n```bash\nreact-native-path-aliases --name \u003cmy-package-name\u003e\n# or\nreact-native-path-aliases -n \u003cmy-package-name\u003e \n```\nto generate new packages/aliases at any time\n\nIf your `tsconfig.json` or `babel.config.js` files live under a different path or use different file names, you can run:\n```bash\nreact-native-path-aliases --name \u003cmy-package-name\u003e --tsConfigPath path/to/tsconfig --babelConfigPath path/to/babelConfig\n# or\nreact-native-path-aliases -n \u003cmy-package-name\u003e -t path/to/tsconfig -b path/to/babelConfig\n```\n\n### Creating Aliases without Generating a Package Directory\nThere may be times where you're integrating path aliases into already existent directories. To generate aliases without generating directories, you can use the `--aliasOnly` or `-a` flag\n```bash\nreact-native-path-aliases --aliasOnly --name \u003cmy-package-name\u003e\n# or\nreact-native-path-aliases -a -n \u003cmy-package-name\u003e \n```\n\n### Overriding Base URL's\nIn certain instances you may want to create a package/alias at a different path than your TS Config's baseURL (or \"./\"). To do so you can run:\n```bash\nreact-native-path-aliases --name \u003cmy-package-name\u003e --destination ./path/to/package/destination\n# or\nreact-native-path-aliases -n \u003cmy-package-name\u003e -d ./path/to/package/destination\n```\n\n### Package Templates\nIn many projects creating new packages often comes with a default template for the directory being created. This template may include files such as a `package.json`, a `gitignore`, an editor configuration, and more. To configure the CLI to build your custom package template along with your path aliases you can:\n\n1. Create your template directory somewhere inside your app\n2. Execute the CLI using the `--packageTemplatePath` (`-p`) flag\n\n```bash\nreact-native-path-aliases --n \u003cmy-package-name\u003e -p path/to/package/tempate\n```\n\nThe CLI will clone the template directory and copy it over to the location of your new package. By default, packages will be created as an empty directory with the default location `${TSConfig.compilerOptions.baseURL}/${specified-package-name}`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexfigliolia%2Freact-native-path-aliases","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexfigliolia%2Freact-native-path-aliases","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexfigliolia%2Freact-native-path-aliases/lists"}