Skip to content

Commit

Permalink
Add package.json configuration for Emscripten build
Browse files Browse the repository at this point in the history
This commit introduces a new configuration for Emscripten, generating a package.json file tailored for JavaScript/TypeScript bindings. The configuration includes metadata such as name, version, description, and repository information, ensuring seamless integration and deployment in JavaScript environments.

Contribute to NP-637
  • Loading branch information
jellespijker committed Dec 9, 2024
1 parent 9062500 commit 67bb4fc
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,22 @@ def package_info(self):
ext = ".exe" if self.settings.os == "Windows" else ""
self.conf_info.define_path("user.curaengine:curaengine",
os.path.join(self.package_folder, "bin", f"CuraEngine{ext}"))
if self.settings.os == "Emscripten":
package_json = {
"name": f"@ultimaker/{self.name.lower()}js",
"version": f"{self.version}",
"description": f"JavaScript / TypeScript bindings for {self.name}, a {self.description}",
"main": "bin/CuraEngine.js",
"repository": {
"type": "git",
"url": self.url
},
"author": self.author,
"license": self.license,
"keywords": self.topics,
"files": [
"bin",
"package.json"
]
}
self.conf_info.define(f"user.{self.name.lower()}:package_json", package_json)

0 comments on commit 67bb4fc

Please sign in to comment.