From cdd8ff258582f5eba7e3941a5a18007e7aabbbfa Mon Sep 17 00:00:00 2001 From: Daniel Beauchamp Date: Thu, 2 Aug 2012 13:38:19 -0400 Subject: Better generators, sample widgets, and more! --- templates/widget/%name%/%name%.coffee.tt | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 templates/widget/%name%/%name%.coffee.tt (limited to 'templates/widget/%name%/%name%.coffee.tt') diff --git a/templates/widget/%name%/%name%.coffee.tt b/templates/widget/%name%/%name%.coffee.tt new file mode 100644 index 0000000..5ddfb1b --- /dev/null +++ b/templates/widget/%name%/%name%.coffee.tt @@ -0,0 +1,11 @@ +class AllTheThings.<%= Thor::Util.camel_case(name) %> extends AllTheThings.Widget + source: '<%= name %>' + + ready: -> + # This is fired when the widget is done being rendered + + onData: (data) -> + # Handle incoming data + # You can access the html node of this widget with `@node` + # Example: $(@node).effect("pulsate") will make the node flash each time data comes in. + super \ No newline at end of file -- cgit v1.2.3 From 780fe49f715c2fced88e958b02541bf8e7dca934 Mon Sep 17 00:00:00 2001 From: Daniel Beauchamp Date: Wed, 8 Aug 2012 18:02:56 -0400 Subject: Rename project to 'Dashing', and do some other cleanups --- templates/widget/%name%/%name%.coffee.tt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'templates/widget/%name%/%name%.coffee.tt') diff --git a/templates/widget/%name%/%name%.coffee.tt b/templates/widget/%name%/%name%.coffee.tt index 5ddfb1b..9105f9a 100644 --- a/templates/widget/%name%/%name%.coffee.tt +++ b/templates/widget/%name%/%name%.coffee.tt @@ -1,5 +1,4 @@ -class AllTheThings.<%= Thor::Util.camel_case(name) %> extends AllTheThings.Widget - source: '<%= name %>' +class Dashing.<%= Thor::Util.camel_case(name) %> extends Dashing.Widget ready: -> # This is fired when the widget is done being rendered @@ -7,5 +6,5 @@ class AllTheThings.<%= Thor::Util.camel_case(name) %> extends AllTheThings.Widge onData: (data) -> # Handle incoming data # You can access the html node of this widget with `@node` - # Example: $(@node).effect("pulsate") will make the node flash each time data comes in. + # Example: $(@node).fadeOut().fadeIn() will make the node flash each time data comes in. super \ No newline at end of file -- cgit v1.2.3 From b585121df5976a514c06981de73c611b8a3157d3 Mon Sep 17 00:00:00 2001 From: Daniel Beauchamp Date: Fri, 24 Aug 2012 17:58:16 -0400 Subject: Remove some lingering calls to 'super' from widgets. --- templates/widget/%name%/%name%.coffee.tt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'templates/widget/%name%/%name%.coffee.tt') diff --git a/templates/widget/%name%/%name%.coffee.tt b/templates/widget/%name%/%name%.coffee.tt index 9105f9a..bc752e1 100644 --- a/templates/widget/%name%/%name%.coffee.tt +++ b/templates/widget/%name%/%name%.coffee.tt @@ -6,5 +6,4 @@ class Dashing.<%= Thor::Util.camel_case(name) %> extends Dashing.Widget onData: (data) -> # Handle incoming data # You can access the html node of this widget with `@node` - # Example: $(@node).fadeOut().fadeIn() will make the node flash each time data comes in. - super \ No newline at end of file + # Example: $(@node).fadeOut().fadeIn() will make the node flash each time data comes in. \ No newline at end of file -- cgit v1.2.3