{"id":18888389,"url":"https://github.com/pnpm/symlink-dir","last_synced_at":"2025-05-16T13:07:40.313Z","repository":{"id":42012355,"uuid":"80243944","full_name":"pnpm/symlink-dir","owner":"pnpm","description":"Cross-platform directory symlinking","archived":false,"fork":false,"pushed_at":"2025-04-29T10:09:14.000Z","size":391,"stargazers_count":74,"open_issues_count":8,"forks_count":1,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-05-15T08:23:57.099Z","etag":null,"topics":["cross-platform","filesystem","node","nodejs","symlink"],"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/pnpm.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,"zenodo":null}},"created_at":"2017-01-27T20:37:44.000Z","updated_at":"2025-04-29T10:09:20.000Z","dependencies_parsed_at":"2024-01-23T15:07:32.688Z","dependency_job_id":"c7238f0c-8e94-4db4-aa14-93c00447d7c6","html_url":"https://github.com/pnpm/symlink-dir","commit_stats":{"total_commits":131,"total_committers":8,"mean_commits":16.375,"dds":"0.46564885496183206","last_synced_commit":"b0c6bc302e09284b2887ee727251b711c636626b"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnpm%2Fsymlink-dir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnpm%2Fsymlink-dir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnpm%2Fsymlink-dir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnpm%2Fsymlink-dir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pnpm","download_url":"https://codeload.github.com/pnpm/symlink-dir/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254535829,"owners_count":22087399,"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":["cross-platform","filesystem","node","nodejs","symlink"],"created_at":"2024-11-08T07:43:52.051Z","updated_at":"2025-05-16T13:07:40.295Z","avatar_url":"https://github.com/pnpm.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# symlink-dir\n\n\u003e Cross-platform directory symlinking\n\n\u003c!--@shields('npm')--\u003e\n[![npm version](https://img.shields.io/npm/v/symlink-dir.svg)](https://www.npmjs.com/package/symlink-dir)\n\u003c!--/@--\u003e\n\n* Always uses \"junctions\" on Windows. Even though support for \"symbolic links\" was added in Vista+, users by default lack permission to create them\n* Any file or directory, that has the destination name, is renamed before creating the link\n\n## Installation\n\n```sh\npnpm add symlink-dir\n```\n\n## CLI Usage\n\nLets suppose you'd like to self-require your package. You can link it to its own `node_modules`:\n\n```sh\n# from -\u003e to\nsymlink-dir . node_modules/my-package\n```\n\n## API Usage\n\n\u003c!--@example('./example.js')--\u003e\n```js\n'use strict'\nconst symlinkDir = require('symlink-dir')\nconst path = require('path')\n\nsymlinkDir('src', 'node_modules/src')\n  .then(result =\u003e {\n    console.log(result)\n    //\u003e { reused: false }\n\n    return symlinkDir('src', 'node_modules/src')\n  })\n  .then(result =\u003e {\n    console.log(result)\n    //\u003e { reused: true }\n  })\n  .catch(err =\u003e console.error(err))\n```\n\u003c!--/@--\u003e\n\n## API\n\n### `symlinkDir(target, path, opts?): Promise\u003c{ reused: boolean, warn?: string }\u003e`\n### `symlinkDir.sync(target, path, opts?): { reused: boolean, warn?: string }`\n\nCreates the link called `path` pointing to `target`.\n\nOptions:\n\n* `overwrite` - *boolean* - is `true` by default. When `false`, existing files at dest are not overwritten.\n\nResult:\n\n* `reused` - *boolean* - is `true` if the symlink already existed pointing to the `target`.\n* `warn` - *string* - any issues that happened during linking (it does mean a failure).\n\n## License\n\n[MIT](./LICENSE) © [Zoltan Kochan](https://www.kochan.io)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpnpm%2Fsymlink-dir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpnpm%2Fsymlink-dir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpnpm%2Fsymlink-dir/lists"}