{"id":22433731,"url":"https://github.com/gavinning/paths","last_synced_at":"2025-03-27T07:46:06.244Z","repository":{"id":65373208,"uuid":"89588594","full_name":"gavinning/paths","owner":"gavinning","description":"根据路径创建路径对象","archived":false,"fork":false,"pushed_at":"2017-05-01T05:00:11.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-26T03:03:54.747Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/gavinning.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}},"created_at":"2017-04-27T11:06:40.000Z","updated_at":"2017-04-27T11:07:05.000Z","dependencies_parsed_at":"2023-01-20T02:03:38.870Z","dependency_job_id":null,"html_url":"https://github.com/gavinning/paths","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/gavinning%2Fpaths","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinning%2Fpaths/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinning%2Fpaths/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinning%2Fpaths/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gavinning","download_url":"https://codeload.github.com/gavinning/paths/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245806390,"owners_count":20675296,"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":"2024-12-05T22:15:45.382Z","updated_at":"2025-03-27T07:46:06.189Z","avatar_url":"https://github.com/gavinning.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Paths\n---\n\n### Node\n```sh\nnpm i root-paths --save\n```\n\n### Project\n```\nproject\n├── a\n│   ├── a.js\n│   └── c\n│       └── c.js\n├── b\n│   └── b.js\n└── ins.js\n```\n\n### Usage\n```js\n// ins.js\nconst Paths = require('root-paths')\nglobal.paths = new Paths(__dirname)\n\nrequire(paths.a.a) == require('./a/a')\nrequire(paths.b.b) == require('./b/b')\nrequire(paths.a.c.c) == require('./a/c/c')\n```\n\n#### Options\n```js\n{\n    root: __dirname,                    // 项目根目录\n    folders: [],                        // 执行要查询的子目录\n    filter: ['**/node_modules/**']      // 过滤条件，请参考 glob\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavinning%2Fpaths","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgavinning%2Fpaths","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavinning%2Fpaths/lists"}