{"versions":{"3.3.3":{"name":"@cocos/tfig","version":"3.3.3","description":"Yet another tool to generate .d.ts bundle.","main":"build/gift.js","types":"build/gift.d.ts","scripts":{"build":"tsc -v & tsc","test":"jest","prepublishOnly":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/shrinktofit/gift.git"},"keywords":["bundle","declaration","dts"],"author":{"name":"Leslie Leigh"},"license":"MIT","dependencies":{"fs-extra":"^7.0.1","typescript":"^4.9.3","yargs":"^13.2.2"},"devDependencies":{"@types/fs-extra":"^5.0.5","@types/jest":"^26.0.15","@types/node":"^12.0.0","@types/yargs":"^13.0.0","jest":"^26.6.1","ts-jest":"^26.4.3"},"gitHead":"4c1a7282019c8378e996a2b7b91bab04567c9580","bugs":{"url":"https://github.com/shrinktofit/gift/issues"},"homepage":"https://github.com/shrinktofit/gift#readme","_id":"@cocos/tfig@3.3.3","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-gKMI4WWeD/K6zQ4kf8SVN/eLzMPpQWN2YQrnvyqG2nHKds0Azrg6ngKwLZGHHNyVp8fy7ctN+yKARQ0vThZeTg==","shasum":"537928fb9a7946e3839b42309d662122744ba751","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@cocos/tfig/-/tfig-3.3.3.tgz","fileCount":27,"unpackedSize":177262,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDtXePDmYRsurD+qt1qW9UIfPl4SZtSPWv6LvAWwebLxAiAbdTuc8LOhgKhgr8ocSYRwV3XxQ4BzkG3ewjgbuXm8AA=="}],"size":36113},"_npmUser":{"name":"anonymous","email":"engine-deploy@cocos.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"engine-deploy@cocos.com"},{"name":"anonymous","email":"chinese1236@qq.com"},{"name":"anonymous","email":"shrinktofit@outlook.com"},{"name":"anonymous","email":"devhacker520@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tfig_3.3.3_1713521925645_0.6654996735396652"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-04-19T10:18:46.869Z","publish_time":1713521926869,"_source_registry_name":"default","contributors":[]},"3.3.4":{"name":"@cocos/tfig","version":"3.3.4","description":"Yet another tool to generate .d.ts bundle.","main":"build/gift.js","types":"build/gift.d.ts","scripts":{"build":"tsc -v & tsc","test":"jest","prepublishOnly":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/shrinktofit/gift.git"},"keywords":["bundle","declaration","dts"],"author":{"name":"Leslie Leigh"},"license":"MIT","dependencies":{"fs-extra":"^7.0.1","typescript":"^4.9.3","yargs":"^13.2.2"},"devDependencies":{"@types/fs-extra":"^5.0.5","@types/jest":"^26.0.15","@types/node":"^12.0.0","@types/yargs":"^13.0.0","jest":"^26.6.1","ts-jest":"^26.4.3"},"gitHead":"ffb910b2603ed258b295b2a8bc0fb156f1b04872","bugs":{"url":"https://github.com/shrinktofit/gift/issues"},"homepage":"https://github.com/shrinktofit/gift#readme","_id":"@cocos/tfig@3.3.4","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-WzGKJeBzf5OhEFX2O8Yir/TEsIigF6cd5pK1eOosFxRPySGlyV0KCVcscI3Stwy3z7c4DyFbgW7GZ7VZvC8KjA==","shasum":"bc85534956b0af49b5fdf875152a0ee7deb0d669","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@cocos/tfig/-/tfig-3.3.4.tgz","fileCount":27,"unpackedSize":177618,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAPgyu4VjMBaIhjoAqXRyT6MaEHnqdu2F9502qdlR0aiAiBJJRA4kaCCKk4JSxgMeP5q5YCXWIEu3iYsvgphejFkcg=="}],"size":36160},"_npmUser":{"name":"anonymous","email":"engine-deploy@cocos.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"chinese1236@qq.com"},{"name":"anonymous","email":"shrinktofit@outlook.com"},{"name":"anonymous","email":"devhacker520@gmail.com"},{"name":"anonymous","email":"engine-deploy@cocos.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tfig_3.3.4_1742280227293_0.8299830744391259"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-03-18T06:43:47.746Z","publish_time":1742280227746,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"3.3.4"},"name":"@cocos/tfig","time":{"created":"2024-04-19T10:46:14.408Z","modified":"2025-05-21T08:21:11.899Z","3.3.3":"2024-04-19T10:18:46.869Z","3.3.4":"2025-03-18T06:43:47.746Z"},"readme":"Yet another tool to generate bundled `.d.ts`.\n\nThe tool is essentially used in https://github.com/cocos-creator/engine .\n\nFor instance, this tool bundles\n```\ndeclare module \"index\" {\n    export * from \"math\";\n}\ndeclare module \"math\" {\n    export { Vec2 } from \"math/vec2\";\n    export { Vec3 } from \"math/vec3\";\n    import * as utils from \"math/utils\";\n    export { utils };\n}\ndeclare module \"math/vec2\" {\n    export class Vec2 {}\n}\ndeclare module \"math/vec3\" {\n    export class Vec3 {}\n}\ndeclare module \"math/utils\" {\n    export function sin();\n    export function cos();\n}\n```\ninto\n```\ndeclare module \"my-module\" {\n    export class Vec2 {}\n    export class Vec3 {}\n    namespace utils {\n        export function sin(n: number);\n        export function cos(n: number);\n    }\n}\n```\n\n## Getting started\n\n### How-to\n\nInstall this package, such as, from npm:\n```bash\nnpm install -g tfig\n```\n\nCompile your TypeScript project, make sure to let tsc generate a single declaration file. eg. Have the option `outFile` in `tsconfig.json`:\n```json\n{\n    outFile: \"out.js\",\n}\n```\n\nBundle:\n```bash\ngift-cli --input \"out.d.ts\" --root \"name-of-the-root-module-in-your-project\" --output \"path-to-your-output-dir\" --name \"your-bundle-name\"\n```\n\n### Comman line arguments\n\n*input*\n\nPath to the unbundled `*.d.ts` file. In general, this file this produced by tsc.\n\n*root*\n\nName of the root module to bundle.\n\n*output*\n\nOutput path. Can be directory or file.\n\n*name*\n\nThe generated module name.","users":{}}