Skip to content

Feedback #98

Open
Open
@farfromrefug

Description

@farfromrefug

Hi,

After being interviewed by the Nativescript team, I was asked to give feedback of the seed and especially the layout which did not fill my need.

So first here is an example of plugin I am developing and the structure that goes with it
https://github.com/Akylas/nativescript-collectionview

So the main features are:

  • separated src folder from plugin folder:
    • src: actual sources folder and nothing else, no config files ! (tsconfig, node_modules ...). That way you can use symlink within any app to directly develop
    • plugin: folder where tsc outputs its files. That's what I use when I do file:// in a demo package.json. This is also where I do npm publish.
    • demo folder using the plugin as ``file://``` in package.json. That way you test the plugin like your user would use it.
    • dev demo folder where src folder is symlinked directly within the app. This makes very fast app development with live reload on plugin update

Separating src and plugin is very important and practical. Thanks to that we don't have ts and js files corresponding to the same class. This prevents a lot of errors in demo projects.

That workflow works really really well but have some issues too:

  • using symlinks in the dev demo projects make so that you don't get plugin "platforms" folder. So you need to copy any dependency or resources within the dev demo folder. Can be a pain when you often change/update them
  • using symlink there's an issue with native classes extension where java classes would not be regenerated on file change. For example adding a new override methods with symlinks, you need to re run the build process for the corresponding generated java class to be updated. (this one could be / should be fixed on the Nativescript side).

I hope that can help you with the seed. Any feedback, improvements are welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions