Skip to content

Commit 67bb4fc

Browse files
committed
Add package.json configuration for Emscripten build
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
1 parent 9062500 commit 67bb4fc

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

conanfile.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,3 +204,22 @@ def package_info(self):
204204
ext = ".exe" if self.settings.os == "Windows" else ""
205205
self.conf_info.define_path("user.curaengine:curaengine",
206206
os.path.join(self.package_folder, "bin", f"CuraEngine{ext}"))
207+
if self.settings.os == "Emscripten":
208+
package_json = {
209+
"name": f"@ultimaker/{self.name.lower()}js",
210+
"version": f"{self.version}",
211+
"description": f"JavaScript / TypeScript bindings for {self.name}, a {self.description}",
212+
"main": "bin/CuraEngine.js",
213+
"repository": {
214+
"type": "git",
215+
"url": self.url
216+
},
217+
"author": self.author,
218+
"license": self.license,
219+
"keywords": self.topics,
220+
"files": [
221+
"bin",
222+
"package.json"
223+
]
224+
}
225+
self.conf_info.define(f"user.{self.name.lower()}:package_json", package_json)

0 commit comments

Comments
 (0)