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

Add widget example #120

Open
jcardonadcdev opened this issue Mar 23, 2017 · 5 comments
Open

Add widget example #120

jcardonadcdev opened this issue Mar 23, 2017 · 5 comments

Comments

@jcardonadcdev
Copy link

It would be nice to have an advanced example that shows how to make a widget that extends _WidgetBase and _TemplatedMixin. I see some examples in github repositories, but it would be good to get an example from SitePen that demonstrates best practices.

@gavinr
Copy link

gavinr commented Aug 1, 2017

I would appreciate this too.

@davewilton
Copy link
Contributor

In the meantime you will probably find this helpful
https://www.sitepen.com/blog/2017/03/29/what-typescript-can-offer-to-dojo-1-x/

@GordonSmith
Copy link

Does anyone have an example of this working?

@davewilton
Copy link
Contributor

Yes see the link above, you will find it very helpful. Basically you just need to add declareDecorator to your project and enable experimental decorators in your tsconfig.

Here is a link to a very simple example

https://www.dropbox.com/s/vmtc10dc405n39e/ExampleWidget.zip?dl=0

@GordonSmith
Copy link

GordonSmith commented Jul 27, 2018

Thanks for the sample - I had (finally) got something similar working myself.

The current issue I am seeing is trying to "derive" a Dojo JS class from a TypeScript Dojo Class. While this is probably just a non runner, it would greatly help in a large migration we are doing?

(Between this and https://github.com/OpenNTF/dojo-webpack-plugin we finally have a modern dev environment for the legacy wen app!!!).

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

No branches or pull requests

4 participants