{"id":17224620,"url":"https://github.com/colinespinas/ezmm","last_synced_at":"2025-04-14T00:44:49.459Z","repository":{"id":74415417,"uuid":"278220352","full_name":"ColinEspinas/ezmm","owner":"ColinEspinas","description":"⛓️ An easy ES Module Manager to use modern javascript.","archived":false,"fork":false,"pushed_at":"2021-02-18T15:30:56.000Z","size":83,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T14:55:05.745Z","etag":null,"topics":["cli","front-end","javascript","modules","modules-manager","packages","packages-manager"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/ColinEspinas.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}},"created_at":"2020-07-09T00:06:14.000Z","updated_at":"2022-01-24T15:39:27.000Z","dependencies_parsed_at":"2023-06-02T15:00:30.068Z","dependency_job_id":null,"html_url":"https://github.com/ColinEspinas/ezmm","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColinEspinas%2Fezmm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColinEspinas%2Fezmm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColinEspinas%2Fezmm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColinEspinas%2Fezmm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ColinEspinas","download_url":"https://codeload.github.com/ColinEspinas/ezmm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248804721,"owners_count":21164127,"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":["cli","front-end","javascript","modules","modules-manager","packages","packages-manager"],"created_at":"2024-10-15T04:11:35.480Z","updated_at":"2025-04-14T00:44:49.437Z","avatar_url":"https://github.com/ColinEspinas.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EZMM\n[![NPM Badge](https://img.shields.io/npm/v/ezmm?style=for-the-badge)](https://www.npmjs.com/package/ezmm)\n[![Licence Badge](https://img.shields.io/github/license/ColinEspinas/ezmm?style=for-the-badge)](https://github.com/ColinEspinas/ezmm/blob/master/LICENSE)\n\nAn easy ES Module Manager to use modern javascript.\n\n## Table of Content\n\n- [Getting Started](#-getting-started)\n  - [Prerequisites](#-prerequisites)\n  - [Installation](#-installation)\n  - [Usage](#-usage)\n- [Commands](#️-commands)\n- [Configuration](#-configuration)\n  - [Providers](#-providers)\n- [License](#-license)\n- [Contact](#️-contact)\n\n## 🚀 Getting Started\n\n### 🏠 Prerequisites\n\n* [NodeJS](https://nodejs.org)\n* [NPM](https://www.npmjs.com) or [Yarn](https://yarnpkg.com) (or your favorite node package manager)\n\n\n### 📦 Installation\nThe installation is pretty simple, **just install the package**.\n\n```sh\n# NPM\nnpm install [-g] ezmm\n\n# Yarn\nyarn [global] add ezmm\n```\n\n### 🏄 Usage\n\nEZMM is super simple to use, **just use the `link` command to add a module** to your `modules` directory and `modules.json` file. If the `modules` directory and the `modules.json` files do not exist they will be created.\n\n```sh\nezmm link react\n```\n\nThen in your javascript you can **import linked modules from the `modules` directory**.\n\n```js\nimport react from 'modules/react.js';\n```\n*Note: Be sure to **link your javascript in your html with `type=\"module\"`.***\n\nYou can overwrite the provider and/or the version you are using with the `link` command.\n\n```sh\nezmm link react -p esm.sh -t 16.10\n# React will now use the version 16.10 provided by esm.sh\n```\n\nAfterward, if you want to remove a module that you don't use anymore, use the `unlink` command.\n\n```sh\nezmm unlink react\n```\n\nOnce a module is linked you will see it in the `modules.json` file that is automatically created on the first `link` command (given you used the `name` argument). This file has a simple structure and is made to help with maintenance.\n\n```json\n{\n  \"react\": {\n    \"provider\": \"skypack\",\n    \"tag\": \"16.10\"\n  },\n  \"darken\": {\n    \"url\": \"https://unpkg.com/darken@latest/dist/darken.mjs\"\n  }\n}\n```\n\nYou can modify everything in this file and use the `link` command without arguments to update your links.\n\n```sh\nezmm link\n# Given the example above, \n# will link react 16.10 from skypack and darken from custom url\n```\n\n## ⌨️ Commands\n\n### `link [name]`\n\n- **-p, --provider** : Defines the [CDN provider](#-providers). (default: \"skypack\")\n- **-u, --url** : If used, uses this value as the CDN url.\n- **-t, --tag** : Specifies a version/dist tag to the module (only if the provider is compatible).\n- **-nc, --no-check** : If used, do not check the status of the CDN provider.\n- **-nd, --no-default** : If used do not try to import the export named \"default\".\n\nThe `link` command will link a module `\u003cname\u003e` in your `modules` directory and create an entry for the module in the `modules.json` file (will create new ones if they do not exist).\n\n```sh\n# Using the default provider\nezmm link react\n\n# Using a custom CDN url\nezmm link react -u https://unpkg.com/react@16/umd/react.development.js \n```\n\nYou can also use the `link` command without argument to link all the modules in you `modules.json` file.\n\n```sh\nezmm link\n```\n\n### `unlink \u003cname\u003e`\n\nThe `unlink` command will delete a module `\u003cname\u003e` of your `modules` directory.\n\n```sh\nezmm unlink react\n```\n\n### `help [command]`\n\nThe `help` command will display the program help or the `[command]` help if specified.\n\n```sh\n# Program help\nezmm help\n\n# Link command help\nezmm help link\n```\n\nYou can also use the `-h` or `--help` option on any command to display the help.\n```sh\nezmm link -h\n```\n\n## ⚙️ Configuration\n\n### 📫 Providers\n\nYou can configure the providers of EZMM by editing the `provider.json` file in the package directory.\n\nThe default file will look like this:\n```json\n{\n  \"default\": \"skypack\",\n  \"providers\": {\n    \"skypack\": \"https://cdn.skypack.dev/%n@%t\",\n    \"jspm\": \"https://jspm.dev/%n@%t\",\n    \"esm.sh\": \"https://esm.sh/%n@%t\"\n  }\n}\n```\n\nOn any provider you add you will probably need to give the module's name with `%n` and/or the module's version/dist tag with `%t`.\n\nDo not hesitate to do a pull request to add providers to ezmm default `provider.json`.\n\n## 📜 License\n\nEZMM is distributed under the MIT License. See `LICENSE` for more information.\n\n## ✉️ Contact\n\nI am **Colin Espinas** you can contact me using my\n\n[![Website](https://img.shields.io/badge/-website-brightgreen?style=for-the-badge)](https://colinespinas.com/contact)\n[![Website](https://img.shields.io/badge/email-contact@colinespinas.com-orange?style=for-the-badge)](mailto:contact@colinespinas.com)\n[![Website](https://img.shields.io/badge/-LinkedIn-blue?style=for-the-badge\u0026logo=linkedin)](https://linkedin.com/in/colin-espinas)\n[![Website](https://img.shields.io/badge/-Github-lightgrey?style=for-the-badge\u0026logo=github)](https://github.com/ColinEspinas)\n\nThis project source's are at [https://github.com/ColinEspinas/ezmm](https://github.com/ward-framework/ezmm).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolinespinas%2Fezmm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcolinespinas%2Fezmm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolinespinas%2Fezmm/lists"}