gs1 / gs1-syntax-engine

GS1 Syntax Engine
Apache License 2.0
27 stars 5 forks source link

Publish to npm #5

Closed dyrkow closed 5 months ago

dyrkow commented 6 months ago

Hi, you can publish js/nodejs code in npm?

terryburton commented 6 months ago

Publishing the API to language repository platforms is being discussed within GS1 at this time with a decision due shortly.

If the decision is to publish then things will start to happen once the details are resolved: Which repos to target (npm, Maven, ...), how to publish artifacts that contain "native" code (which architectures to build for and how, e.g. x86, amd64, arm64; wasm vs JS-only), how to align versioning, CD pipelines...

node.js is a key platform and will almost certainly be targeted. If you are proficient in publishing WASM libraries to npm then a PR that gets most of the way there would be welcome. Or should a non-WASM (JS-only) build produced by EMCC be uploaded to npm — experience of what works best for Node.js library distribution is very valuable.

terryburton commented 5 months ago

A npm package containing the WASM target and JavaScript wrapper is now published here: https://www.npmjs.com/package/gs1encoder

It is built against the current HEAD of this project, which should be functionality equivalent to the latest 2023-12-11 release of the Syntax Engine.

As some point in the future the Syntax Engine will switch to semantic versioning so that the version of GitHub releases and the library packages can be aligned in order to avoid confusion and automate package distribution.