{"id":15078807,"url":"https://github.com/shirtiny/ts-lib-template","last_synced_at":"2026-01-02T17:47:48.142Z","repository":{"id":107626291,"uuid":"378373899","full_name":"Shirtiny/ts-lib-template","owner":"Shirtiny","description":"A starter template for typescript npm library, base on esbuild/Parcel. 一个typescript 三方库模版，一键发布在npm，基于esbuild或Parcel，两者在不同的分支。","archived":false,"fork":false,"pushed_at":"2023-02-15T15:53:31.000Z","size":341,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T23:50:43.388Z","etag":null,"topics":["esbuild","makefile","parcel","prettier","starter","starter-template","template","typescript","typescript-library","webpack"],"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/Shirtiny.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":"2021-06-19T09:30:04.000Z","updated_at":"2025-02-11T11:39:21.000Z","dependencies_parsed_at":"2023-07-23T02:52:23.223Z","dependency_job_id":null,"html_url":"https://github.com/Shirtiny/ts-lib-template","commit_stats":{"total_commits":116,"total_committers":4,"mean_commits":29.0,"dds":0.5344827586206897,"last_synced_commit":"132501b1903396f6b35c9024633c416bd4415287"},"previous_names":[],"tags_count":43,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shirtiny%2Fts-lib-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shirtiny%2Fts-lib-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shirtiny%2Fts-lib-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shirtiny%2Fts-lib-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shirtiny","download_url":"https://codeload.github.com/Shirtiny/ts-lib-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243896287,"owners_count":20365351,"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":["esbuild","makefile","parcel","prettier","starter","starter-template","template","typescript","typescript-library","webpack"],"created_at":"2024-09-25T05:00:59.286Z","updated_at":"2026-01-02T17:47:48.094Z","avatar_url":"https://github.com/Shirtiny.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ts-lib-template\n\n\u003e [Ts-lib-template](https://github.com/Shirtiny/ts-lib-template) A starter template for typescript library.\n\n```shell\n# init project\nyarn\n# build\nyarn build\n\n# tag and version\nmake version\n# publish to npm\nmake publish\n\n# dev\nyarn start\n```\n\n## Introduction\n\nThis is a template for typescript library base on esbuild/parcel. This template includes followings:\n\n- TypeScript\n\n- Esbuild / Parcel\n\n- Makefile\n\n- Dev server\n\n- Env\n\n- Prettier\n\n- Eslint\n\n- Jest\n\n- Sass/scss \u0026 Autoprefixer\n\n- Github action\n\n## Usage\n\n1. Create your repository by clicking 'Use this template' top of the page. Then, check the `Include all branches` option.\n\n2. Select a branch and rename it as `main`, then mark that branch as `default` at github repository settings:\n   - `esbuild` This branch is based on Esbuild with a lot of customization.\n   - `parcel` This branch is based on Parcel, it's more simple and easy to understand.  \n   - `main` Same as `esbuild`, but it will move to parcel when parcel is complete.\n\n## Config\n\n\u003e This just an example, please refer to the content on the specific branch.\n\n```js\n// .sh.js\nconst { MY_ENV, PORT, NODE_ENV, npm_package_name } = process.env;\n\n// the customized ENV， just pick what you need\nconst env = {\n  MY_ENV,\n  PORT,\n  NODE_ENV,\n  npm_package_name,\n};\n\nmodule.exports = {\n  // your lib global name\n  globalName: \"tsLibTemplate\",\n  // the output prefix name， default is 'main', please check your package.json after this option changed.\n  outputFileName: \"main\",\n  // devServer option\n  devServer: {\n    host: HOST || \"localhost\",\n    port: PORT || 2021,\n    proxy: {\n      \"^/api\": {\n        target: \"http://192.168.0.123:1234\",\n        pathRewrite: { \"^/api\": \"\" },\n      },\n    },\n  },\n  // jsx options direct set to esbuild\n  jsxFactory: \"React.createElement\",\n  jsxFragment: \"React.Fragment\",\n  // if env is false, default is all process env\n  env,\n};\n```\n\n## Acknowledgment\n\n[raulanatol / template-ts-package](https://github.com/raulanatol/template-ts-package)\n\n## License\n\nThe MIT License (MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshirtiny%2Fts-lib-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshirtiny%2Fts-lib-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshirtiny%2Fts-lib-template/lists"}