{"id":16641369,"url":"https://github.com/cmstead/iomoduleconfig","last_synced_at":"2026-03-14T21:04:43.226Z","repository":{"id":72520596,"uuid":"140607655","full_name":"cmstead/IoModuleConfig","owner":"cmstead","description":null,"archived":false,"fork":false,"pushed_at":"2018-07-19T23:40:01.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-18T15:24:45.205Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Io","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/cmstead.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":"2018-07-11T17:22:50.000Z","updated_at":"2018-07-19T23:40:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"f83d27de-7357-4073-840b-15ce8ff48f25","html_url":"https://github.com/cmstead/IoModuleConfig","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"4fd332d3571e3d262d708b306692bdee9208585c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmstead%2FIoModuleConfig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmstead%2FIoModuleConfig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmstead%2FIoModuleConfig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmstead%2FIoModuleConfig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmstead","download_url":"https://codeload.github.com/cmstead/IoModuleConfig/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243159166,"owners_count":20245675,"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-10-12T07:46:21.196Z","updated_at":"2025-12-24T21:50:50.140Z","avatar_url":"https://github.com/cmstead.png","language":"Io","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IoModuleConfig #\n\nA module configuration library for Io language to allow for self-contained modules to be packaged and configured.  Has a dependency on LibPath and PathUtil protos:\n\n(Links will be put here when libraries are versioned independently.  For now, both of these protos are in this package.  Simply put them in your project and make them available in your Importer search path.)\n\n## Setup ##\n\nTo set up your module, first add the `LibPath.io` and `PathUtil.io` files from the [IoPathUtils repository](https://github.com/cmstead/IoPathUtils) based on the instructions in the readme.\n\nNex, create a package file in your package root named like the following:\n\n`\u003cpackageName\u003ePackage.io`\n\nFinally, set up a base configuration which should look similar to the following:\n\n```io\nLibPath addPathWithBaseByDirName(\"\u003cbaseDirectoryName\u003e\", \"libs/ModuleConfig\")\n\n\u003cpackageName\u003ePackage := ModuleConfig clone \\\n    do(\n        setName(\"\u003cpackageName\u003e\")\n        setVersion(\"1.0.0\")\n\n        initializeModuleLoader()\n    )\n\n\u003cpackageName\u003ePackage init := method(\n    prodConfig(block(\n        moduleLoader \\\n            configure()\n    ))\n\n    devConfig(block(\n        moduleLoader \\\n            configure()\n    ))\n)\n```\n\n## Usage ##\n\nAt the top of your main script or proto, include the following:\n\n```io\n\u003cpackageName\u003ePackage clone production call\n```\n\nIf you have a development script or test package, included, you can set up for development by doing the following instead:\n\n```io\n\u003cpackageName\u003ePackage clone development call\n```\n\nThis will ensure all configuration and libraries are properly set up for your project when it runs.\n\n## Examples ##\n\nThe IoTest package uses IoModuleConfig.  The following examples are the current configuration in IoTest:\n\nIoTestPackage:\n\n```io\nLibPath addPathWithBaseByDirName(\"iotest\", \"libs/ModuleConfig\")\n\nIoTestPackage := ModuleConfig clone \\\n    do(\n        setName(\"iotest\")\n        setVersion(\"1.0.0\")\n\n        initializeModuleLoader()\n    )\n\nIoTestPackage init := method(\n    prodConfig(block(\n        moduleLoader \\\n            addSearchPath(\"core\") \\\n            addSearchPath(\"core/runnerCore\") \\\n            addSearchPath(\"core/assertionCore\") \\\n            addSearchPath(\"core/testCore\") \\\n            configure()\n    ))\n\n    devConfig(block(\n\n    ))\n)\n```\n\nIoTest test runner:\n\n```io\npackageConfig := IoTestPackage clone\ncwd := PathUtil getSearchPathByDirName(packageConfig name)\n\npackageConfig development call\n\nIoTestRunnerFactory \\\n    buildRunner() \\\n        setCwd(cwd) \\\n        setTestExtension(\".test\") \\\n        addTestPath(\"tests\") \\\n        run()\n```\n\n## API ##\n\n### ModuleConfig ###\n\n**devConfig**\n\nSets the development configuration block for use later\n\nContract: `devConfig(devConfigBlock:Block)`\n\n**initializeModuleLoader**\n\nCreates a new module loader instance and performs a base configuration\n\nContract: `initializeModuleLoader()`\n\n**moduleLoader**\n\nAn instance of ModuleLoader, see API below for this object\n\n**prodConfig**\n\nSets the production configuration block for use later\n\nContract: `prodConfig(prodConfigBlock:Block)`\n\n### ModuleLoader ###\n\n**addSearchPath**\n\nAdds a new search path to the list of paths to be registered with Importer.  All search paths are expected to be relative to the base path.\n\nContract: `addSearchPath(searchPath:string)`\n\n**setBasePathByName**\n\nSets module base path based on the directory name provided.  Base path is captured from Importer search paths.\n\nContract: `setBasePathByName(dirName:string)`\n\n**configure**\n\nConfigures search paths for all found libraries and other registered search paths with Importer.\n\nContract: `configure()`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmstead%2Fiomoduleconfig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmstead%2Fiomoduleconfig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmstead%2Fiomoduleconfig/lists"}