wasm-pack
wasm-pack copied to clipboard
`wasm-pack fake` so CI tests and the like don't have to do any rust compilation
💡 Feature description
add wasm-pack fake <package name> which generates a fake package to make TypeScript happy, and puts it right in node_modules.
So CI jobs don't have to spend like 5 minutes building rust just to type-check the TypeScript part of the project.
If you want to check against the WASM bindings you can just not use this feature.
I think the name of the module you want should be an argument so that, you don't even need to have the rust code (e.g., if it's in a submodule and you don't want to waste time downloading)
💻 Basic example
I think all that's necessary is to generate:
node_modules/foo/package.json
{
"name": "foo",
"types": "foo.d.ts"
}
node_modules/foo/foo.d.ts
declare module "foo";
epic issue number