Is it possible to include some JS/TS code in my ko...
# javascript
t
Is it possible to include some JS/TS code in my kotlin/JS project? What would the gradle file look like?
e
I use an NPM workspace, which includes the generated KJS packages.
Root `package.json`:
Copy code
"workspaces": [
  "kjs-project/generated-packages/package1",
  "kjs-project/generated-packages/package2",
  "ts-packages/*"
],
In my Gradle convention plugin I've got something on the line of:
Copy code
nodejs {
  if (generatePackage) {
    // Generate the distribution packages under ".../generated-packages".
    // This allows using the outputted packages as part of a workspace more easily
    distribution(Action {
      val rootDir = project.rootProject.layout.projectDirectory
      outputDirectory.set(rootDir.dir("generated-packages/${project.name}"))
    })
  }
  ...