{"id":20374358,"url":"https://github.com/michijs/dev-server","last_synced_at":"2025-04-12T07:12:54.612Z","repository":{"id":62123319,"uuid":"338044243","full_name":"michijs/dev-server","owner":"michijs","description":"Development server built on top of esbuild","archived":false,"fork":false,"pushed_at":"2025-04-07T22:37:59.000Z","size":501,"stargazers_count":3,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T07:12:34.526Z","etag":null,"topics":["bundler","commonjs","compiler","css","development","esbuild","esm","javascript","jsx","michijs","minifier","pwa","react","server","tsx","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/michijs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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},"funding":{"github":["michijs"],"patreon":null,"open_collective":"michijs","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://www.paypal.com/paypalme/lsegurado2"}},"created_at":"2021-02-11T13:58:46.000Z","updated_at":"2025-03-17T19:29:55.000Z","dependencies_parsed_at":"2023-10-12T01:16:59.230Z","dependency_job_id":"5885fd88-2171-40b4-8990-164d88a5a86d","html_url":"https://github.com/michijs/dev-server","commit_stats":{"total_commits":111,"total_committers":4,"mean_commits":27.75,"dds":"0.43243243243243246","last_synced_commit":"9f2b6957e7e503034dc92cf1bd758aa3fd1d3c3d"},"previous_names":[],"tags_count":101,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michijs%2Fdev-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michijs%2Fdev-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michijs%2Fdev-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michijs%2Fdev-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michijs","download_url":"https://codeload.github.com/michijs/dev-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248530571,"owners_count":21119600,"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":["bundler","commonjs","compiler","css","development","esbuild","esm","javascript","jsx","michijs","minifier","pwa","react","server","tsx","typescript"],"created_at":"2024-11-15T01:24:00.340Z","updated_at":"2025-04-12T07:12:54.601Z","avatar_url":"https://github.com/michijs.png","language":"TypeScript","funding_links":["https://github.com/sponsors/michijs","https://opencollective.com/michijs","https://www.paypal.com/paypalme/lsegurado2"],"categories":[],"sub_categories":[],"readme":"# Michijs Dev Server\nDevelopment server built on top of esbuild.\n\u003c!-- TODO: To generate feature-image require to install roboto --\u003e\n\n![npm][version] [![license][github-license]][github-license-url] ![npm][npm-downloads] ![npm][repo-size]\n  [![Tests](https://github.com/michijs/dev-server/actions/workflows/tests.yml/badge.svg)](https://github.com/michijs/dev-server/actions/workflows/tests.yml)\n\n## Main features\n- Configure esbuild options with Typescript\n- First-class PWA support\n- Custom environments\n- Packages distribution\n\n## Getting started\n\nYou can use the following [test project](https://github.com/michijs/michijs-template) or setup a project from scratch:\n\n    npm install -D @michijs/dev-server\n\n## CLI commands\nYou have the following CLI commands:\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eCLI command\u003c/th\u003e\n      \u003cth\u003eDefault environment\u003c/th\u003e\n      \u003cth\u003eDescription\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003estart\u003c/td\u003e\n      \u003ctd\u003eDEVELOPMENT\u003c/td\u003e\n      \u003ctd\u003eAllows to start a dev server as a webpage.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003ebuild\u003c/td\u003e\n      \u003ctd\u003ePRODUCTION\u003c/td\u003e\n      \u003ctd\u003eAllows to build the src code as a webpage.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003edist\u003c/td\u003e\n      \u003ctd\u003eDISTRIBUTION\u003c/td\u003e\n      \u003ctd\u003eAllows to distribute the src code as a package. At the moment ESBuild does not support .d.ts files so we still use the Typescript compiler with the tsconfig provided by esbuildOptions field.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003egenerate-icons\u003c/td\u003e\n      \u003ctd\u003e-\u003c/td\u003e\n      \u003ctd\u003eAllows to generate a full set of icons from a src icon.\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\n## Configure the server\nTo configure the server you just need to create an optional file called michi.config.ts at the root of your project. This file would look like this:\n\n```ts\nimport { ServerConfig, ServerConfigFactory, DefaultEnvironment } from '@michijs/server';\n\nexport const config: ServerConfigFactory = (environment) =\u003e {\n  const defaultConfig: ServerConfig = {\n    // Your custom configuration\n  }\n  return defaultConfig;\n};\n\nexport default config;\n```\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth colspan=\"4\"\u003eServerConfig\u003c/th\u003e\n      \u003cth\u003eDefault value\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eenv\u003c/td\u003e\n      \u003ctd colspan=\"3\"\u003eAllows to add environment variables\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eesbuildOptions\u003c/td\u003e\n      \u003ctd colspan=\"3\"\u003eAll the options available at \u003ca href=\"https://esbuild.github.io/plugins/#build-options\"\u003eesbuild documentation\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003eCan be chequed \u003ca href=\"#esbuild-default-options\"\u003ehere\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eopenBrowser\u003c/td\u003e\n      \u003ctd colspan=\"3\"\u003eIf the browser should open at localhost url when server starts\u003c/td\u003e\n      \u003ctd\u003e\"true\"\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003ewatch\u003c/td\u003e\n      \u003ctd colspan=\"3\"\u003eIf the server should watch for changes on the folders\u003c/td\u003e\n      \u003ctd\u003e\"true\"\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eport\u003c/td\u003e\n      \u003ctd colspan=\"3\"\u003ePort to run dev server on\u003c/td\u003e\n      \u003ctd\u003e\"3000\"\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd rowspan=\"14\"\u003epublic\u003c/td\u003e\n      \u003ctd rowspan=\"14\"\u003ePublic folder - will be copied at server start\u003c/td\u003e\n      \u003ctr\u003e\n        \u003ctd rowspan=\"4\"\u003eassets\u003c/td\u003e\n        \u003ctr\u003e\n          \u003ctd\u003epath\u003c/td\u003e\n          \u003ctd\u003e\"assets\"\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003escreenshots\u003c/td\u003e\n          \u003ctd\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003efeatureImage\u003c/td\u003e\n          \u003ctd\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n        \u003ctd colspan=\"2\"\u003eindexName\u003c/td\u003e\n        \u003ctd\u003e\"index.html\"\u003c/td\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n        \u003ctd colspan=\"2\"\u003eminify\u003c/td\u003e\n        \u003ctd\u003e\"true\" if environment is PRODUCTION\u003c/td\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n        \u003ctd colspan=\"2\"\u003epath\u003c/td\u003e\n        \u003ctd\u003e\"public\"\u003c/td\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n        \u003ctd rowspan=\"3\"\u003emanifest \u003cbr/\u003e\u003csmall\u003e(A JSON document that contains startup parameters and application defaults for when a web application is launched.)\u003c/small\u003e\u003c/td\u003e\n        \u003ctr\u003e\n          \u003ctd\u003ename\u003c/td\u003e\n          \u003ctd\u003e\"manifest.json\"\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003eoptions\u003c/td\u003e\n          \u003ctd\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n        \u003ctd rowspan=\"3\"\u003ewellKnown \u003cbr/\u003e\u003csmall\u003e(A URI with the path component /.well-known/assetlinks.json is used by the AssetLinks protocol to identify one or more digital assets (such as web sites or mobile apps) that are related to the hosting web site in some fashion.)\u003c/small\u003e\u003c/td\u003e\n        \u003ctr\u003e\n          \u003ctd\u003erelation\u003c/td\u003e\n          \u003ctd\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003etarget\u003c/td\u003e\n          \u003ctd\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n      \u003c/tr\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n## Esbuild default options\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eField\u003c/th\u003e\n      \u003cth\u003eDefault value\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003ebundle\u003c/td\u003e\n      \u003ctd\u003e\"true\"\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eentryPoints\u003c/td\u003e\n      \u003ctd\u003e['src/index.ts']\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eformat\u003c/td\u003e\n      \u003ctd\u003e\"esm\"\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003ekeepNames\u003c/td\u003e\n      \u003ctd\u003e\"true\" if environment is PRODUCTION\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003elogLevel\u003c/td\u003e\n      \u003ctd\u003e\"error\"\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eminifySyntax\u003c/td\u003e\n      \u003ctd\u003e\"true\" if environment is PRODUCTION\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eminifyWhitespace\u003c/td\u003e\n      \u003ctd\u003e\"true\" if environment is PRODUCTION\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eoutdir\u003c/td\u003e\n      \u003ctd\u003e\"build\"\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003esourcemap\u003c/td\u003e\n      \u003ctd\u003e\"true\" if environment is \u003cb\u003eNOT\u003c/b\u003e PRODUCTION\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003esplitting\u003c/td\u003e\n      \u003ctd\u003e\"true\"\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003etarget\u003c/td\u003e\n      \u003ctd\u003e\"esnext\"\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003etsconfig\u003c/td\u003e\n      \u003ctd\u003e\"tsconfig.json\"\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n## License\n - [MIT](https://github.com/michijs/dev-server/blob/master/LICENSE.md)\n\n[repo-size]: https://img.shields.io/github/repo-size/michijs/dev-server\n[npm-downloads]: https://img.shields.io/npm/dt/@michijs/dev-server\n[version]: https://img.shields.io/npm/v/@michijs/dev-server\n[github-license]: https://img.shields.io/github/license/michijs/dev-server\n[github-license-url]: https://github.com/michijs/dev-server/blob/master/LICENSE.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichijs%2Fdev-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichijs%2Fdev-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichijs%2Fdev-server/lists"}