{"id":17127401,"url":"https://github.com/danielkucal/symlink-resolver","last_synced_at":"2025-07-25T14:04:29.730Z","repository":{"id":57376200,"uuid":"89159941","full_name":"DanielKucal/symlink-resolver","owner":"DanielKucal","description":"Simple tool for replacing symlinks by real files and vice versa. Created for #nativescript builds.","archived":false,"fork":false,"pushed_at":"2017-04-24T23:31:05.000Z","size":15,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T21:37:25.556Z","etag":null,"topics":["build-tool","nativescript","symlink","symlink-alternative","symlinks"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/DanielKucal.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":"2017-04-23T17:32:58.000Z","updated_at":"2024-06-05T21:03:37.000Z","dependencies_parsed_at":"2022-09-05T19:11:27.597Z","dependency_job_id":null,"html_url":"https://github.com/DanielKucal/symlink-resolver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielKucal%2Fsymlink-resolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielKucal%2Fsymlink-resolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielKucal%2Fsymlink-resolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielKucal%2Fsymlink-resolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DanielKucal","download_url":"https://codeload.github.com/DanielKucal/symlink-resolver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248675143,"owners_count":21143763,"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":["build-tool","nativescript","symlink","symlink-alternative","symlinks"],"created_at":"2024-10-14T19:04:34.878Z","updated_at":"2025-04-13T06:35:08.833Z","avatar_url":"https://github.com/DanielKucal.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Symlink Resolver\nThis tool allows to replace symbolic links by real files in given directory and revert the changes back to symlinks. All the magic in a simple cli command!\n\n### Installation\n```\nnpm install symlink-resolver --save-dev\n```\n[Node.js](https://nodejs.org/) v6.4+ and [POSIX](https://en.wikipedia.org/wiki/POSIX#POSIX-certified)-standarized operating system are required.\n\nTo your `package.json` `scripts` section add the following rule:\n```\n\"scripts\": {\n    \"symlink-resolver\": \"symlink-resolver\",\n}\n```\n\n## Basic Usage\nFor fast usage you can simply run:\n+ `npm run symlink-resolver build ./symlinks/path` to **replace** symlinks by real files in ./symlinks/path\n+ `npm run symlink-resolver clear ./symlinks/path` to **restore** all symlinks\n\nFirst command will create `./symlinks/path/.symlinks.json` file which contains changes that have been made in this directory. It will be removed by the second command, however you can still add to your `.gitignore` the following rule: `.symlinks.json`\n\n##### How to create a symlink?\nUse `ln -s target source` command, i.e.:\n```\nln -s ../../source/path/linked-dir ./project/src/linked-dir\n```\n  \n### Advanced usage\nIf you need this feature to make a build, then I strongly recommend to automatize your building process:\n```\n\"scripts\": {\n        \"symlink-resolver\": \"symlink-resolver\",\n        \"prebuild\": \"npm run symlink-resolver build ./symlinks/path\",\n        \"postbuild\": \"npm run symlink-resolver clear ./symlinks/path\",\n        \"build\": \"your build command should be under this name\"\n}\n```\nThis way you will be able to make a build and edit your files without worries.\n\nHowever, in some cases like emulating a device, the \"post\" script will not be executed. If this is also your case then take a look at example workaround for NativeScript:\n```\n  \"scripts\": {\n    \"symlink-resolver\": \"symlink-resolver\",\n    \"prens-bundle\": \"npm run symlink-resolver build ./symlinks/path\",\n    \"delay-clear\": \"sleep 22 \u0026\u0026 npm run symlink-resolver clear ./symlinks/path\",\n    \"ns-bundle\": \"npm run delay-clear | ns-bundle\",\n    \"start-android-bundle\": \"npm run ns-bundle --android --start-app\",\n    \"start-ios-bundle\": \"npm run ns-bundle --ios --start-app\",\n    \"build-android-bundle\": \"npm run ns-bundle --android --build-app\",\n    \"build-ios-bundle\": \"npm run ns-bundle --ios --build-app\"\n  },\n```\n\n#### Advanced configuration\nYou can adjust `Config` to your needs. \n- Want to use custom symlinks file name? No problem, just set `Config.symlinksFile` to whatever you want. \n- Need some custom behavior? Simply extend `SymlinkHelper` class and set `Config.helperClass` to yours.\n```\nexport interface ConfigInterface {\n    rootDir: string;\n    symlinksFile: string;\n    helperClass: typeof SymlinkHelper;\n}\n```\n \n##### Happy developing!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielkucal%2Fsymlink-resolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielkucal%2Fsymlink-resolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielkucal%2Fsymlink-resolver/lists"}