{"id":13727263,"url":"https://github.com/syumai/dem","last_synced_at":"2025-03-21T13:32:50.666Z","repository":{"id":47337382,"uuid":"204393674","full_name":"syumai/dem","owner":"syumai","description":"A module version manager for Deno.","archived":false,"fork":false,"pushed_at":"2021-10-16T14:48:20.000Z","size":125,"stargazers_count":61,"open_issues_count":6,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-13T00:17:07.893Z","etag":null,"topics":["deno","typescript"],"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/syumai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-26T04:08:43.000Z","updated_at":"2023-09-14T12:20:23.000Z","dependencies_parsed_at":"2022-07-20T21:02:39.691Z","dependency_job_id":null,"html_url":"https://github.com/syumai/dem","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syumai%2Fdem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syumai%2Fdem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syumai%2Fdem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syumai%2Fdem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syumai","download_url":"https://codeload.github.com/syumai/dem/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221815797,"owners_count":16885228,"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":["deno","typescript"],"created_at":"2024-08-03T01:03:46.783Z","updated_at":"2024-10-28T10:15:05.232Z","avatar_url":"https://github.com/syumai.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# dem\n\n[![Build Status](https://github.com/syumai/dem/workflows/test/badge.svg?branch=master)](https://github.com/syumai/dem/actions)\n\n- A simple module version manager for Deno.\n- dem creates `dem.json` and links script files with version.\n  - linked scripts are stored in `vendor` directory.\n- dem provides an **easy way to update dependencies.**\n\n## Example\n\n**Using `https://deno.land/std/http/server.ts` at `v0.51.0`**\n\n- `dem.json`\n  - generated file like a package.json\n\n```json\n{\n  \"modules\": [\n    {\n      \"protocol\": \"https\",\n      \"path\": \"deno.land/std\",\n      \"version\": \"v0.51.0\",\n      \"files\": [\n        \"/http/server.ts\"\n      ]\n    }\n  ]\n}\n```\n\n- `vendor/https/deno.land/std/http/server.ts`\n  - generated linked script includes version specified in `dem.json`\n\n```ts\nexport * from \"https://deno.land/std@v0.51.0/http/server.ts\";\n```\n\n- `example.ts`\n  - script to run\n\n```ts\n// You can import module without the version.\nimport { serve } from \"./vendor/https/deno.land/std/http/server.ts\";\n```\n\n## Install\n\n```sh\ndeno install --allow-read --allow-write --allow-net -f -n dem https://deno.land/x/dem@0.9.9/cmd.ts\n```\n\n## Usage\n\n### Getting Started\n\n#### 1. `dem init` to create `dem.json`\n\n```sh\n$ dem init\nsuccessfully initialized the project.\n```\n\n#### 2. `dem add` to add module.\n\n```sh\n$ dem add https://deno.land/std@v0.51.0\nsuccessfully added new module: https://deno.land/std, version: v0.51.0\n```\n\n#### 3. Edit your script and import module from `vendor`.\n\n`example.ts`\n\n```ts\nimport * as path from './vendor/https/deno.land/std/fs/path.ts';\n\nconsole.log(path.join(Deno.cwd(), 'example'));\n```\n\n#### 4. `dem ensure` to resolve modules.\n\n```sh\n$ dem ensure\nsuccessfully created link: https://deno.land/std@v0.51.0/fs/path.ts\n```\n\n#### 5. Run your script.\n\n```sh\n$ deno example.ts\n```\n\n## Standard Usage\n\n### Updating module\n\n* `dem update` updates versions in `dem.json` and linked scripts.\n\n```sh\n$ dem update https://deno.land/std@v0.52.0\nsuccessfully updated module: https://deno.land/std, version: v0.52.0\n```\n\n## Advanced Usage\n\n### Alias\n\n* With alias, shortened script paths are available.\n\n`example.ts`\n\n```ts\n// Original\nimport * as dejs from \"./vendor/https/deno.land/x/dejs/mod.ts\"\n// With alias\nimport * as dejs from \"./vendor/dejs.ts\"\n```\n\n#### How to use alias\n\n1. execute `dem alias`.\n\n```sh\n# create alias for module.\n$ dem alias https://deno.land/x/dejs/mod.ts dejs.ts # ./vendor/dejs.ts will be created.\n```\n\n2. import script using alias path\n\n```ts\nimport * as dejs from \"./vendor/dejs.ts\"\n```\n\n3. run `dem ensure`.\n\n```sh\n# create link for `./vendor/https/deno.land/x/dejs/mod.ts`.\n$ dem ensure\n```\n\n## Commands\n\n```sh\ndem init                                          # initialize dem.json\ndem add https://deno.land/x/dejs@0.1.0            # add module `dejs` and set its version to `0.1.0`\ndem link https://deno.land/x/dejs/mod.ts          # create link of `dejs@0.1.0/mod.ts` and put it into vendor.\ndem update https://deno.land/x/dejs@0.2.0         # update module to `0.2.0`\ndem unlink https://deno.land/x/dejs/mod.ts        # remove link of `dejs@0.2.0/mod.ts`.\ndem remove https://deno.land/x/dejs               # remove module `dejs`\ndem ensure                                        # resolve file paths of added modules used in project and link them.\ndem prune                                         # remove unused modules and linked scripts.\ndem alias https://deno.land/x/dejs/mod.ts dejs.ts # create alias for module and put it into vendor.\ndem unalias dejs.ts                               # remove alias for module.\n```\n\n### Unsupported features\n\n- [x] default export\n- [ ] manage `.d.ts` file\n\n## Author\n\nsyumai\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyumai%2Fdem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyumai%2Fdem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyumai%2Fdem/lists"}