Using NPM
Publishing AS packages to npm and more!
Publishing to NPM
Publishing an AssemblyScript project
Publishing an AS package to NPM is quite simple. We need to delete the main
key and provide the types
and ascMain
keys in our package.json
.
Make sure that the main AssemblyScript file is named index.ts
.
Don't include a ./
` in front of your types/ascMain path.
package.json
Both ascMain and types MUST point to an index.ts
file. If not, AssemblyScript will panic.
Publishing the loader
Publishing the loader file works if you are targeting JS modules. Keep in mind that this will not work with AssemblyScript projects.
package.json
Sometimes, things get really tricky. I'll extend this article further in the future.
Last updated