NativeScript / nx

NativeScript for Nx.
Other
61 stars 15 forks source link

[Q] How can lib generator be used to create NS plugins? #26

Open mahmoudajawad opened 3 years ago

mahmoudajawad commented 3 years ago

I'm trying to create a plugin to be used across two apps in the workspace. The plugin requires native libs, so simply using lib generator doesn't seem to create structure to allow me to add native libs. I tried to configure tsconfig, but it seems without having a package definition at the lib-level, building a plugin won't be possible, and I'm not sure how that can be achieved.

mahmoudajawad commented 3 years ago

I tried this and it didn't work, which makes me wonder how do these things work:

mahmoudajawad commented 3 years ago

I updated the error message (in previous comment) after I found that one of the child apps tsconfig.json is the reason behind the previous parsing error, however, another error came up, and though I tried hunting it down at @nativescript/build-tools/src/generators/add-package, I failed as it expects to have a demo app in the workspace, and without it, the plugin package won't be created. I hope to give this more time in the coming days to figure out a recipe that allows me to get it working.