{"_id":"@ali1416/snk","_rev":"4-9f121404a5a07a3482cf8279e64b3fc0","name":"@ali1416/snk","dist-tags":{"latest":"1.3.0"},"versions":{"1.0.0":{"name":"@ali1416/snk","version":"1.0.0","keywords":["GitHub","SVG"],"author":{"name":"ali","email":"ali-k@foxmail.com"},"license":"Apache-2.0","_id":"@ali1416/snk@1.0.0","maintainers":[{"name":"ali1416","email":"1416978277@qq.com"}],"homepage":"https://github.com/ALI1416/snk","bugs":{"url":"https://github.com/ALI1416/snk/issues/new"},"dist":{"shasum":"8e287703f38caae74f76b01ef242e0aea3c29eb2","tarball":"https://registry.npmjs.org/@ali1416/snk/-/snk-1.0.0.tgz","fileCount":27,"integrity":"sha512-wtxXvVTFozeLmpD/2OsAHQWt2JvPSAifdiNzYE1c8unyUz61VwmWiLi8xa14IMqWiI1R+fpuitTYbME4AzENtg==","signatures":[{"sig":"MEUCIEOEdveG2FwOaCcnNRr4NLh/iwGIMX+h7MQ0dBvK7bMeAiEA1w2PxsZgxC0cFTX7JIR4fwOpXVd/v4yRvtmfsVJcxC4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":119541},"main":"./dist/snk.node.js","types":"./types/main.d.ts","module":"./lib/main.js","engines":{"node":">=14.0.0"},"gitHead":"42e65e2ec31158206768730c3c4344e8fa135f57","scripts":{"tsc":"npx tsc","build":"npm run tsc && npm run rollup","rollup":"npx rollup -c --bundleConfigAsCjs"},"_npmUser":{"name":"ali1416","email":"1416978277@qq.com"},"repository":{"url":"git+https://github.com/ALI1416/snk.git","type":"git"},"_npmVersion":"9.5.1","description":"GitHub贡献图动画","directories":{},"_nodeVersion":"18.16.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@babel/core":"^7.22.1","@rollup/plugin-babel":"^6.0.3","@rollup/plugin-terser":"^0.4.3"},"_npmOperationalInternal":{"tmp":"tmp/snk_1.0.0_1689751883548_0.08312114781203728","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@ali1416/snk","version":"1.1.0","keywords":["GitHub","SVG"],"author":{"name":"ali","email":"ali-k@foxmail.com"},"license":"Apache-2.0","_id":"@ali1416/snk@1.1.0","maintainers":[{"name":"ali1416","email":"1416978277@qq.com"}],"homepage":"https://github.com/ALI1416/snk","bugs":{"url":"https://github.com/ALI1416/snk/issues/new"},"dist":{"shasum":"247338ef359028cc4cbe53c541dbae8203ff90b2","tarball":"https://registry.npmjs.org/@ali1416/snk/-/snk-1.1.0.tgz","fileCount":27,"integrity":"sha512-TZhMlcvcVY+usclZ+ALev9KeGYUGTynnA+Dd6rMgwdPhZDYlC1xsnodUl4timSmyVSg0pme+TmWE1JE0lvjLtw==","signatures":[{"sig":"MEYCIQDk3+nCW+e5hut+GXpTjy0k6h5IVbZ4aKM2ZeBPTxB1WwIhANuRnWmrBGurYu5wVRvJJ9Xsvx8GDWGjrQN69z6X/vjx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":119623},"main":"./dist/snk.node.js","types":"./types/main.d.ts","module":"./lib/main.js","engines":{"node":">=14.0.0"},"gitHead":"ef18c9d12581b0899f51324c9c94c205c11c046d","scripts":{"tsc":"npx tsc","build":"npm run tsc && npm run rollup","rollup":"npx rollup -c --bundleConfigAsCjs"},"_npmUser":{"name":"ali1416","email":"1416978277@qq.com"},"repository":{"url":"git+https://github.com/ALI1416/snk.git","type":"git"},"_npmVersion":"9.5.1","description":"GitHub贡献图动画","directories":{},"_nodeVersion":"18.16.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.2","@babel/core":"^7.23.5","@rollup/plugin-babel":"^6.0.4","@rollup/plugin-terser":"^0.4.4"},"_npmOperationalInternal":{"tmp":"tmp/snk_1.1.0_1701660243454_0.0464612234881856","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@ali1416/snk","version":"1.2.0","keywords":["GitHub","SVG"],"author":{"name":"ali","email":"ali-k@foxmail.com"},"license":"Apache-2.0","_id":"@ali1416/snk@1.2.0","maintainers":[{"name":"ali1416","email":"1416978277@qq.com"}],"homepage":"https://github.com/ALI1416/snk","bugs":{"url":"https://github.com/ALI1416/snk/issues/new"},"dist":{"shasum":"c9fa8141fbf2abada6f92e89c3836be3b5aa2099","tarball":"https://registry.npmjs.org/@ali1416/snk/-/snk-1.2.0.tgz","fileCount":27,"integrity":"sha512-qHohomLNvTnCCLEdjdT+aiffwkHP1zmNQVN3BnQm1ADburSj8etv6eGPlvnGRfpIn42yEfaANAAS2IPHi2GWeg==","signatures":[{"sig":"MEUCIA6nnrBM2SudY6RyXRMwMg11rpHLr1K81+wi9aaKsZ+rAiEA0lhHJEBtFlbX12FFrpJ9wgAlXWGbVBOvPuGelK6zvU8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":120209},"main":"./dist/snk.node.js","types":"./types/main.d.ts","module":"./lib/main.js","engines":{"node":">=14.0.0"},"gitHead":"d5b75f70c1982860c42cfc57bec9e1d3f5ad1c2d","scripts":{"tsc":"npx tsc","build":"npm run tsc && npm run rollup","rollup":"npx rollup -c --bundleConfigAsCjs"},"_npmUser":{"name":"ali1416","email":"1416978277@qq.com"},"repository":{"url":"git+https://github.com/ALI1416/snk.git","type":"git"},"_npmVersion":"10.8.2","description":"GitHub贡献图动画","directories":{},"_nodeVersion":"22.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rollup":"^4.28.0","typescript":"^5.7.2","@babel/core":"^7.26.0","@rollup/plugin-babel":"^6.0.4","@rollup/plugin-terser":"^0.4.4"},"_npmOperationalInternal":{"tmp":"tmp/snk_1.2.0_1733218332018_0.36431235812841933","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@ali1416/snk","version":"1.3.0","description":"GitHub贡献图动画","scripts":{"tsc":"tsc","rollup":"rollup -c --bundleConfigAsCjs","build":"npm run tsc && npm run rollup"},"main":"./dist/snk.node.js","module":"./lib/main.js","types":"./types/main.d.ts","author":{"name":"ali","email":"ali-k@foxmail.com"},"keywords":["GitHub","SVG"],"license":"Apache-2.0","homepage":"https://github.com/ALI1416/snk","bugs":{"url":"https://github.com/ALI1416/snk/issues/new"},"repository":{"type":"git","url":"git+https://github.com/ALI1416/snk.git"},"engines":{"node":">=14.13.0"},"publishConfig":{"access":"public"},"devDependencies":{"@babel/core":"^7.29.7","@rollup/plugin-babel":"^7.1.0","@rollup/plugin-terser":"^1.0.0","rollup":"^4.62.4","typescript":"^7.0.2"},"gitHead":"92a3b6426b82eca67546ce1bdc48e1b6eff84c98","_id":"@ali1416/snk@1.3.0","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-raSD/jAD/3c0yPraNKpHa2BBfG9ILrrE9jnqEloOCG6vIF+xUHW/lQusUjS2t4Y35DHMOwqZNpp1H5oBXYGoNw==","shasum":"c074d313320712d8860060dcced802ed01f37a15","tarball":"https://registry.npmjs.org/@ali1416/snk/-/snk-1.3.0.tgz","fileCount":27,"unpackedSize":120014,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDbH8xj/Qp9fLSToQVJjV6cA3G/D6f31FEb+dQ6QFJ7VgIgUIf0qyWy3YyRso+hFLOr+rNmryNNrt/EI3WXhm+5xP8="}]},"_npmUser":{"name":"ali1416","email":"1416978277@qq.com"},"directories":{},"maintainers":[{"name":"ali1416","email":"1416978277@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/snk_1.3.0_1786519653170_0.7668214033375669"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-19T07:31:23.467Z","modified":"2026-08-12T07:27:33.485Z","1.0.0":"2023-07-19T07:31:23.768Z","1.1.0":"2023-12-04T03:24:03.632Z","1.2.0":"2024-12-03T09:32:12.207Z","1.3.0":"2026-08-12T07:27:33.308Z"},"bugs":{"url":"https://github.com/ALI1416/snk/issues/new"},"author":{"name":"ali","email":"ali-k@foxmail.com"},"license":"Apache-2.0","homepage":"https://github.com/ALI1416/snk","keywords":["GitHub","SVG"],"repository":{"type":"git","url":"git+https://github.com/ALI1416/snk.git"},"description":"GitHub贡献图动画","maintainers":[{"name":"ali1416","email":"1416978277@qq.com"}],"readme":"# GitHub Contribution Graph Animation GitHub贡献图动画\r\n\r\n[![License](https://img.shields.io/github/license/ALI1416/snk?label=License)](https://www.apache.org/licenses/LICENSE-2.0.txt)\r\n[![Node Support](https://img.shields.io/badge/Node-14+-green)](https://nodejs.org/)\r\n[![NPM](https://img.shields.io/npm/v/@ali1416/snk?label=NPM)](https://www.npmjs.com/package/@ali1416/snk)\r\n[![Tag](https://img.shields.io/github/v/tag/ALI1416/snk?label=Tag)](https://github.com/ALI1416/snk/tags)\r\n[![Repo Size](https://img.shields.io/github/repo-size/ALI1416/snk?label=Repo%20Size&color=success)](https://github.com/ALI1416/snk/archive/refs/heads/master.zip)\r\n\r\n[![Node CI](https://github.com/ALI1416/snk/actions/workflows/ci.yml/badge.svg)](https://github.com/ALI1416/snk/actions/workflows/ci.yml)\r\n\r\n## 简介\r\n\r\n本项目参考了[Platane/snk](https://github.com/Platane/snk)，只保留了SVG图片，并对处理逻辑进行了大量优化，构建后`snk.min.js`文件仅`7kb`\r\n\r\n[在线示例](https://www.404z.cn/demo/snk.html)\r\n\r\n## 依赖导入\r\n\r\n### 网页\r\n\r\n<https://unpkg.com/@ali1416/snk/dist/snk.min.js>\r\n\r\n### node\r\n\r\n```sh\r\nnpm install @ali1416/snk\r\n```\r\n\r\n## 方法和参数\r\n\r\n| 参数名   | 中文名   | 类型   | 默认值   |\r\n| -------- | -------- | ------ | -------- |\r\n| userName | 用户名   | string | (无)     |\r\n| type     | 主题模式 | number | 0        |\r\n| year     | 年       | string | (一年前) |\r\n\r\n### 主题模式 type\r\n\r\n| 值  | 主题模式     | 备注           |\r\n| --- | ------------ | -------------- |\r\n| 0   | 混合         | 返回字符串     |\r\n| 1   | 亮           | 返回字符串     |\r\n| 2   | 暗           | 返回字符串     |\r\n| 3   | [混合,亮,暗] | 返回字符串数组 |\r\n\r\n## 使用示例\r\n\r\n```js\r\n// node test-js.js\r\nconst fs = require('fs')\r\n\r\nconst snk = require('../dist/snk.js')\r\nsnk('ali1416', 3).then((res) => {\r\n  fs.writeFileSync('E:/snk.svg', res[0])\r\n  fs.writeFileSync('E:/snk.light.svg', res[1])\r\n  fs.writeFileSync('E:/snk.dark.svg', res[2])\r\n})\r\n```\r\n\r\n更多请见[测试](./test)\r\n\r\n## 更新日志\r\n\r\n[点击查看](./CHANGELOG.md)\r\n\r\n## 参考\r\n\r\n- [Platane/snk](https://github.com/Platane/snk)\r\n\r\n## 关于\r\n\r\n<picture>\r\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://www.404z.cn/images/about.dark.svg\">\r\n  <img alt=\"About\" src=\"https://www.404z.cn/images/about.light.svg\">\r\n</picture>\r\n","readmeFilename":"README.md"}