{"id":20082719,"url":"https://github.com/lexmin0412/rollup2-typescript-template","last_synced_at":"2026-04-21T03:31:20.857Z","repository":{"id":110139990,"uuid":"451805058","full_name":"lexmin0412/rollup2-typescript-template","owner":"lexmin0412","description":"rollup2+typescript模版","archived":false,"fork":false,"pushed_at":"2022-01-26T15:52:34.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-07T08:43:57.371Z","etag":null,"topics":["library","rollup","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@youtils/rollup2-ts-lib-template","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/lexmin0412.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":"2022-01-25T09:01:10.000Z","updated_at":"2022-01-26T15:56:33.000Z","dependencies_parsed_at":"2023-04-08T20:15:40.781Z","dependency_job_id":null,"html_url":"https://github.com/lexmin0412/rollup2-typescript-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":"rollup/rollup-starter-lib","purl":"pkg:github/lexmin0412/rollup2-typescript-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexmin0412%2Frollup2-typescript-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexmin0412%2Frollup2-typescript-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexmin0412%2Frollup2-typescript-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexmin0412%2Frollup2-typescript-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lexmin0412","download_url":"https://codeload.github.com/lexmin0412/rollup2-typescript-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexmin0412%2Frollup2-typescript-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32075217,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T02:38:07.213Z","status":"ssl_error","status_checked_at":"2026-04-21T02:38:06.559Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["library","rollup","typescript"],"created_at":"2024-11-13T15:44:34.758Z","updated_at":"2026-04-21T03:31:20.833Z","avatar_url":"https://github.com/lexmin0412.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rollup2 + typescript 项目模板\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/rollup/rollup-starter-lib.svg)](https://greenkeeper.io/)\n\n\u003e 此项目基于 [rollup-starter-lib](https://github.com/rollup/rollup-starter-lib) 扩展。\n\n此仓库包含了使用 Rollup 创建一个库的简单示例，包括从 `node_modules` 中导入模块并将其从 CommonJS 转换为 ES Module.\n\n我们将会创建一个名为 `how-long-till-lunch` 的库，这里使用了 [ms](https://github.com/zeit/ms) 这个包，它可以我们告诉我们距离下一次午餐还有多久。\n\n```js\nconsole.log('距离下一顿午饭还有 ' + howLongTillLunch());\n```\n\n## Getting started\n\nClone this repository and install its dependencies:\n\n```bash\ngit clone https://github.com/rollup/rollup-starter-lib\ncd rollup-starter-lib\nnpm install\n```\n\n`npm run build` builds the library to `dist`, generating three files:\n\n* `dist/how-long-till-lunch.cjs.js`\n    A CommonJS bundle, suitable for use in Node.js, that `require`s the external dependency. This corresponds to the `\"main\"` field in package.json\n* `dist/how-long-till-lunch.esm.js`\n    an ES module bundle, suitable for use in other people's libraries and applications, that `import`s the external dependency. This corresponds to the `\"module\"` field in package.json\n* `dist/how-long-till-lunch.umd.js`\n    a UMD build, suitable for use in any environment (including the browser, as a `\u003cscript\u003e` tag), that includes the external dependency. This corresponds to the `\"browser\"` field in package.json\n\n`npm run dev` builds the library, then keeps rebuilding it whenever the source files change using [rollup-watch](https://github.com/rollup/rollup-watch).\n\n`npm test` builds the library, then tests it.\n\n## Variations\n\n* [babel](https://github.com/rollup/rollup-starter-lib/tree/babel) — illustrates writing the source code in ES2015 and transpiling it for older environments with [Babel](https://babeljs.io/)\n* [buble](https://github.com/rollup/rollup-starter-lib/tree/buble) — similar, but using [Bublé](https://buble.surge.sh/) which is a faster alternative with less configuration\n* [TypeScript](https://github.com/rollup/rollup-starter-lib/tree/typescript) — uses [TypeScript](https://www.typescriptlang.org/) for type-safe code and transpiling\n\n\n\n## License\n\n[MIT](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flexmin0412%2Frollup2-typescript-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flexmin0412%2Frollup2-typescript-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flexmin0412%2Frollup2-typescript-template/lists"}