{"_id":"@avolgha/mgcrt","name":"@avolgha/mgcrt","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@avolgha/mgcrt","type":"module","version":"0.1.0","description":"simple javascript router","author":{"name":"avolgha","email":"avolgha@gmail.com"},"license":"MIT","homepage":"https://github.com/avolgha/mgcrt#readme","repository":{"type":"git","url":"git+https://github.com/avolgha/mgcrt.git"},"bugs":{"url":"https://github.com/avolgha/mgcrt/issues"},"exports":{".":{"types":"./dist/mgcrt.d.ts","default":"./dist/mgcrt.js"},"./package.json":"./package.json"},"devDependencies":{"@arethetypeswrong/core":"^0.18.2","@types/node":"^25.5.0","@typescript/native-preview":"7.0.0-dev.20260316.1","bumpp":"^11.0.1","publint":"^0.3.18","tsdown":"^0.21.3","typescript":"^5.9.3"},"scripts":{"build":"tsdown","dev":"tsdown --watch","typecheck":"tsc --noEmit","release":"bumpp"},"_id":"@avolgha/mgcrt@0.1.0","_integrity":"sha512-d0dhwyKxzZCSB8Oxnrcg9WWdbW69g9+7IeI28EhJwxOzLPNmzGmi4ieAjTweUos2/THtg/AFdR7eGFAbcVOyxQ==","_resolved":"C:\\Users\\mlw20\\AppData\\Local\\Temp\\8d45a029d76fdedcd2221a0a76276968\\avolgha-mgcrt-0.1.0.tgz","_from":"file:avolgha-mgcrt-0.1.0.tgz","_nodeVersion":"23.2.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-d0dhwyKxzZCSB8Oxnrcg9WWdbW69g9+7IeI28EhJwxOzLPNmzGmi4ieAjTweUos2/THtg/AFdR7eGFAbcVOyxQ==","shasum":"2f0f155649e7980fbbc6690856c669c77cc3b269","tarball":"https://registry.npmjs.org/@avolgha/mgcrt/-/mgcrt-0.1.0.tgz","fileCount":6,"unpackedSize":21186,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFfaj9gA5qy6Vwly5a5bQWDmJD68yM+gVlHIEswTnLKvAiA1/Bd+2XdVBYEXv1uJQiTDWAVhXrCrfoH6KkGxqPmS/g=="}]},"_npmUser":{"name":"avolgha","email":"avolgha@gmail.com"},"directories":{},"maintainers":[{"name":"avolgha","email":"avolgha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mgcrt_0.1.0_1774819430831_0.8907532466476291"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-29T21:23:50.731Z","0.1.0":"2026-03-29T21:23:50.972Z","modified":"2026-03-29T21:23:51.194Z"},"maintainers":[{"name":"avolgha","email":"avolgha@gmail.com"}],"description":"simple javascript router","homepage":"https://github.com/avolgha/mgcrt#readme","repository":{"type":"git","url":"git+https://github.com/avolgha/mgcrt.git"},"author":{"name":"avolgha","email":"avolgha@gmail.com"},"bugs":{"url":"https://github.com/avolgha/mgcrt/issues"},"license":"MIT","readme":"# mgcrt\r\n\r\nSimple JavaScript SPA router implementation.\r\n\r\n## Usage\r\n\r\n```html\r\n<div class=\"links\">\r\n  <button data-page=\"/\">Page 1</button>\r\n  <button data-page=\"/page2\">Page 2</button>\r\n</div>\r\n\r\n<div id=\"root\"></div>\r\n\r\n<script type=\"module\" src=\"...\"></script>\r\n```\r\n\r\n```javascript\r\nimport { init as initMgcrt } from \"./mgcrt.js\";\r\n\r\ninitMgcrt({\r\n  container: document.getElementById(\"root\"),\r\n  pages: [\r\n    {\r\n      path: \"/\",\r\n      template: document.createTextNode(\"Hello World from Page 1!\"),\r\n      populate: () => {},\r\n    },\r\n    {\r\n      path: \"/page2\",\r\n      template: document.createTextNode(\"Hello World from @!\"),\r\n      populate: (element) => {\r\n        element.textContent = element.textContent.replace(\"@\", \"Page 2\");\r\n      },\r\n    },\r\n  ],\r\n});\r\n```\r\n\r\n## Build it yourself\r\n\r\n```bash\r\n$ pnpm install\r\n$ pnpm build\r\n$ cp dist/mgcrt.js ...\r\n```\r\n\r\nThere are also `mgcrt.js.map` and `mgcrt.d.ts` available.\r\n","readmeFilename":"README.md","_rev":"1-406ce389a0e77218594cc6b1d108689a"}