{"id":13827669,"url":"https://github.com/fwilkerson/microenvi","last_synced_at":"2026-05-01T00:16:43.417Z","repository":{"id":50322892,"uuid":"118713893","full_name":"fwilkerson/microenvi","owner":"fwilkerson","description":"Bundle, serve, and hot reload with one command","archived":false,"fork":false,"pushed_at":"2019-03-17T01:35:01.000Z","size":306,"stargazers_count":125,"open_issues_count":2,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-11T21:28:22.392Z","etag":null,"topics":["micro","microbundle"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/microenvi","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/fwilkerson.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}},"created_at":"2018-01-24T04:53:17.000Z","updated_at":"2024-07-10T04:21:52.000Z","dependencies_parsed_at":"2022-08-04T10:30:36.379Z","dependency_job_id":null,"html_url":"https://github.com/fwilkerson/microenvi","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwilkerson%2Fmicroenvi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwilkerson%2Fmicroenvi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwilkerson%2Fmicroenvi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwilkerson%2Fmicroenvi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fwilkerson","download_url":"https://codeload.github.com/fwilkerson/microenvi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225486398,"owners_count":17481888,"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":["micro","microbundle"],"created_at":"2024-08-04T09:02:04.936Z","updated_at":"2026-05-01T00:16:42.510Z","avatar_url":"https://github.com/fwilkerson.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# microenvi\r\n\r\nMicroenvi is a zero configuration micro development environment. Bundle, serve, and hot reload with one command.\r\n\r\nTranspile \u0026 bundle is done with [microbundle](https://github.com/developit/microbundle).\r\n\r\n## Quick start\r\n\r\nA simple hello world with microenvi and preact;\r\n\r\n- first let's initialize our project `npm init --yes`\r\n- then install preact `npm i -S preact`\r\n- finally install microenvi `npm i -D microenvi`\r\n\r\nNow add the following to your package.json\r\n\r\n```json\r\n{\r\n\t\"main\": \"public/static/bundle.mjs\",\r\n\t\"scripts\": {\r\n\t\t\"dev\": \"microenvi\"\r\n\t}\r\n}\r\n```\r\n\r\nCreate a `public` folder and add the following `index.html` to it.\r\n\r\n```html\r\n\u003c!DOCTYPE html\u003e\r\n\u003chtml lang=\"en\"\u003e\r\n\t\u003chead\u003e\r\n\t\t\u003cmeta charset=\"UTF-8\" /\u003e\r\n\t\t\u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" /\u003e\r\n\t\t\u003ctitle\u003eMicroenvi\u003c/title\u003e\r\n\t\u003c/head\u003e\r\n\r\n\t\u003cbody\u003e\r\n\t\t\u003cdiv id=\"root\"\u003e\u003c/div\u003e\r\n\t\u003c/body\u003e\r\n\u003c/html\u003e\r\n```\r\n\r\nFinally create a `src` folder and add the following `index.js` to it.\r\n\r\n```javascript\r\nimport {h, render} from 'preact';\r\n\r\nrender(\u003ch2\u003eHello, Microenvi\u003c/h2\u003e, document.getElementById('root'));\r\n```\r\n\r\nStart your dev environment by running... `npm run dev`\r\n\r\n## CLI Options\r\n\r\n```\r\n  Usage\r\n    $ microenvi \u003ccommand\u003e [options]\r\n\r\n  Available Commands\r\n    watch    Bundle, serve, and reload\r\n\r\n  For more info, run any command with the `--help` flag\r\n    $ microenvi watch --help\r\n\r\n  Options\r\n    -v, --version    Displays current version\r\n    --cwd            Use an alternative working directory  (default .)\r\n    --dir            Specify the directory to watch  (default public)\r\n    --external       Specify external dependencies  (default none)\r\n    --globals        Specify global dependencies  (default none)\r\n    --jsx            A custom JSX pragma like React.createElement  (default h)\r\n    --define         Inline constants  (default none)\r\n    --alias          Remap imports from one module to another  (default none)\r\n    --open           Automatically open browser  (default true)\r\n    --port           Specify a port  (default 3000)\r\n    --single         Serve single page app  (default false)\r\n    --ws             Specify a port for the reload ws  (default 3301)\r\n    -h, --help       Displays this message\r\n```\r\n\r\nThe syntax for `--define` and `--alias` are as follows:\r\n\r\n```bash\r\n$ microenvi --define process.env.NODE_ENV=production,NUM=123,BOOL=true\r\n# and\r\n$ microenvi --alias react=preact-compat,react-dom=preact-compat\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffwilkerson%2Fmicroenvi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffwilkerson%2Fmicroenvi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffwilkerson%2Fmicroenvi/lists"}