Trouble using Spine with browserify

42 views
Skip to first unread message

Xiaoguang Chen

unread,
Apr 19, 2014, 5:39:55 AM4/19/14
to spi...@googlegroups.com
I'm new to Spine. When I tried to use spine with browserify, it complained about cannot finding jquery unless I explicitly set window.jQuery = require "jquery" .
I use npm packaged jquery(1.11.0) and wonder if there's another solution to include jquery to Spine without exporting jQuery variable to the window object.

After some time diving into the source code of Spine, I found some code like $ = window?.jQuery or window?.Zepto or (element) -> element .
What does element stand for? In what circumstance will it be used and how?

Richard Flosi

unread,
Apr 25, 2014, 4:46:15 PM4/25/14
to spi...@googlegroups.com
Not sure, this is something we are exploring too...

Patrick Mulder

unread,
Apr 25, 2014, 5:54:59 PM4/25/14
to spi...@googlegroups.com
I explain an approach to use Backbone with npm +  browserify here: http://thinkingonthinking.com/two-way-databinding-with-stickit/

maybe it can help you 


--
You received this message because you are subscribed to the Google Groups "Spine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spinejs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages