{"id":15008112,"url":"https://github.com/indaxia/imp","last_synced_at":"2026-01-05T22:03:10.530Z","repository":{"id":255685793,"uuid":"853401914","full_name":"Indaxia/imp","owner":"Indaxia","description":"Indaxia Modules \u0026 Packages for Lua","archived":false,"fork":false,"pushed_at":"2024-09-24T03:23:27.000Z","size":121,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-29T15:22:55.294Z","etag":null,"topics":["lua","module-manager","package-manager"],"latest_commit_sha":null,"homepage":"","language":"C#","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/Indaxia.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":"2024-09-06T15:27:40.000Z","updated_at":"2024-09-24T18:22:53.000Z","dependencies_parsed_at":"2024-09-09T23:30:27.117Z","dependency_job_id":null,"html_url":"https://github.com/Indaxia/imp","commit_stats":null,"previous_names":["indaxia/imp-lua"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Indaxia%2Fimp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Indaxia%2Fimp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Indaxia%2Fimp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Indaxia%2Fimp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Indaxia","download_url":"https://codeload.github.com/Indaxia/imp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219856293,"owners_count":16556085,"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":["lua","module-manager","package-manager"],"created_at":"2024-09-24T19:15:10.419Z","updated_at":"2025-10-30T12:31:25.787Z","avatar_url":"https://github.com/Indaxia.png","language":"C#","readme":"# IMP - Indaxia Modules \u0026 Packages\n\nA simple package and module management for apps written on Lua, AngelScript and other dynamic-typed languages.\n\nBrings package management and es6-like Lua modules to your project without copy-paste pain and dependency hell.\nAble to include remote AngelScript dependencies.\n\n![ezgif-4-6c033fac11](https://github.com/user-attachments/assets/daf0e719-16c5-42a6-935b-c5586fa0bc3e)\n\n## Features\nIMP consists of a Package Manager and a Module Manager with it's own Lua or AngelScript part of the code.\n\nA new way to install packages: imp install\nA new way to work with lua dependencies: [IMP Module Manager](https://github.com/Indaxia/imp-lua-mm):satellite:\n\n### Package Manager Features\n- Works with offline directories and online repositories\n- Own package config format in JSON\n- Install packages with dependencies from Github and Bitbucket\n- Install single files directly from Github, Bitbucket or other hosts (allowing them in config)\n- File and directory watcher (sources, config, target)\n- Dependency version resolution\n- Setup your language or sourceExtensions to use with other programming languages\n\n### Module Manager Features\n- Include custom user directories as advanced sources\n- Right dependency order in the target file\n- ES6-like imports and exports in the Lua script\n- AngelScript #include of your and remote packages\n- Really fast target builder on-the-go (C# watcher)\n\n## Download\n\n[IMP for Windows x64](https://indaxia.com/public/releases/imp/1.2/Install%20IMP%20for%20Windows.exe)\n\n[IMP for Linux x64](https://indaxia.com/public/releases/imp/1.2/Install%20IMP%20for%20Linux%20x64.zip)\n\n## Quick Start\n\n1. Install IMP\n2. For game modding (especially Warcraft 3 Reforged follow [the special steps](#quick-start-for-modding-warcraft-3--other-games))\n3. (for Linux) create a symlink /usr/bin/imp -\u003e (imp directory)/imp\n4. Open any terminal window (press Win+R and enter \"cmd\")\n5. enter ```cd \u003cyour project directory\u003e```\n6. For lua enter ```imp init src build.lua``` where src can be any sources folder name in the project\n    * For AngelScript enter ```imp init src main.as packages``` where src can be any sources folder name in the project to auto-include\n8. ```imp watch``` and now you are free to write code and build on the go\n\nTo initialize your package enter ```imp init build.lua```. \nIt will create imp-package.json and .imp directory with the dependencies. If you use git (mercurial/svn/...) add .imp to your ignore file (.gitignore).\n\nTo add new dependency enter ```imp install \u003cpackage\u003e \u003cversion\u003e```\n\n### Quick start for modding Warcraft 3 / other games\n- create a project folder with the \"src\" subfolder\n- save your map in \"map as a directory\" mode into this folder\n- Open any terminal window (press Win+R and enter \"cmd\")\n- enter ```cd \u003cyour project folder\u003e```\n- enter ```imp init src war3map.lua```\n- install all the deps you need\n- ```imp update```\n- ```imp watch```\n\nNow create source files in \"src\" or save your map to build and test it on the go.\n\n#### Example:\n```\nimp install https://github.com/Indaxia/imp-demo-hello\n```\nWe don't recommend to use \"any\" version in public projects. Some scammers or stolen accs may update the code and make it malicious. \n\n#### Specific version example (retrieve from git tag):\n```\nimp install https://github.com/Indaxia/imp-demo-hello 1.0\n```\n\nUse ```imp watch``` to let watcher notify PM and MM if something changed and perform download new packages and/or rebuild modules.\nThe watcher waits when one of the following changes:\n- any directory from config \"sources\"\n- file from config \"target\"\n- config file itself\n\nTo get help about module management refer [IMP Module Manager documentation](https://github.com/Indaxia/imp-lua-mm).\n\n## Advanced Usage\n\n### Including files\nYou can include files directly (Big Integer in the example):\n```\nimp install https://raw.githubusercontent.com/DeBos99/lua-bigint/master/bigint.lua * file\n```\n\n### Clean init\nIf you don't want to use MM on the client (Lua) side you can disable it by removing it from dependencies or init the project with init-clean:\n```\nimp init-clean target.lua\n```\nWith this option IMP just includes code of the dependencies without the MM\n\n### Executing a command before/after building\nIt's possible execute a terminal command when the building process starts and finishes:\n```\n  \"beforeBuild\": \"cmd /C echo \\\"BEFORE BUILD!\\\"\",\n  \"afterBuild\": \"cmd /C echo \\\"AFTER BUILD!\\\" \",\n```\n\nYou can also add a wildcard to replace it with the target file:\n```\n  \"beforeBuild\": \"cmd /C echo \\\"BEFORE BUILD! The target file is: %target%\\\"\",\n  \"afterBuild\": \"cmd /C echo \\\"AFTER BUILD! The target file is: %target%\\\" \",\n```\nThe result will be something like:\n```\n\"BEFORE BUILD! The target file is: C:\\Local\\My project\\build.lua\"\n...\n\"AFTER BUILD! The target file is: C:\\Local\\My project\\build.lua\"\n```\n\nExecution works for root projects only.\n\n### Adding extra watchers\nIf you want to rebuild the target file on some extra files change add them to the \"watchExtra\" section:\n```\n  \"watchExtra\": [\n    \"my extra file 1.w3n\",\n    \"my extra file 2.w3x\",\n  ]\n```\n\n## Publishing Packages\n\nIf you want to publish your package folow these steps:\n1. Create a git repository at Github or Bitbucket\n2. Create imp-package.json in the repository root\n3. Add the \"dependencies\" and \"sources\" parameters. Refer the full config example below.\n    * (AngelScript) Add the \"entryPoint\" parameter with your main file relative path\n4. (optional) add git tag to the repository\n5. Now this is an IMP package!\n\nPlease refer the [imp-demo](https://github.com/Indaxia/imp-demo-hello) structure for better understanding.\n\n## Full config example (imp-package.json) \n\n```js\n{\n    \"title\": \"IMP - Demo Package\", // (optional) your package or root project title\n    \"language\": \"lua\", // (optional) your package language\n    \"author\": \"ScorpioT1000 / scorpiot1000@yandex.ru\", // (optional) author information\n    \"license\": \"MIT\", // (optional) source code license\n    \"dependencies\": { // list of packages and files required by your source code\n        // github repository from a master branch\n        \"https://github.com/123/456\": \"*\",\n        \n        // github repository from the release tagged as \"1.1.1\"\n        \"https://github.com/123/456\": \"1.1.1\",\n        \n        // bitbucket repository from the release tagged as \"1.0.0\" in an object format\n        \"https://bitbucket.org/123/789\": { \"type\": \"package\", \"version\": \"1.0.0\" },\n        \n        // inserts a file directly from the repository\n        \"https://github.com/123/456/blob/master/somefile.lua\": { \n            \"type\": \"file\", \n            \"topOrder\": true  // omit this option or set to false to insert the file after repositories' sources\n        }\n    },\n    // (optional for root project) where your sources are stored. It's important for the package, but can be omitted for root project (it watches \"target\")\n    \"sources\": [\n        \"src\"\n    ],\n    // (optional) where to store compiled build. It works for root project only. You can specify different extension for another language\n    \"target\": \"build.lua\",\n    // (required for AngelScript dependencies) your main file to include in the dependant projects\n    \"entryPoint\": \"main.as\",\n    // (optional) your remote packages folder (default is \".imp/packages\")\n    \"remoteSources\": \"my/packages\",\n    // (optional) extra file list to trigger rebuild on their change (one relative file name per element)\n    \"watchExtra\": [],\n    // (optional) execute this command before build, e.g. \"cmd /C echo \\\"Hello!\\\"\". Placeholders available: %target%\n    \"beforeBuild\": \"\",\n    // (optional) execute this command after build, e.g. \"cmd /C echo \\\"Hello!\\\"\". Placeholders available: %target%\n    \"afterBuild\": \"\",\n    // (optional) allow more hosts for direct file dependency (allows github.com and bitbucket.org by default). It works for root project only.\n    \"allowHosts\": []\n    // (optional) set custom file extensions to use another language (e.g. \"*.js\")\n    \"sourceExtensions\": \"*.lua\",\n}\n```\n\n## Restrictions\n\n1. It doesn't support partial version placeholders like ```1.*``` because it doesn't use package registry\n2. It performs full re-download on any config requirement change (planned to fix in the future)\n\n### How to build the source code\n\nExecute:\n```\ndotnet publish -c Release --self-contained --runtime win-x64 /property:Version=VERSION_HERE\ndotnet publish -c Release --self-contained --runtime linux-x64 /property:Version=VERSION_HERE\n```\n\nThen use Inno Setup for windows and open Setup\\win-x64.iss with it to build the setup file.\n\n\nP.S. What WLPM? Didn't hear about it...\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findaxia%2Fimp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Findaxia%2Fimp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findaxia%2Fimp/lists"}