Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback #98

Open
farfromrefug opened this issue Oct 5, 2018 · 0 comments
Open

Feedback #98

farfromrefug opened this issue Oct 5, 2018 · 0 comments
Labels

Comments

@farfromrefug
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants