Comments (5)
Just committed 1c20317 which eliminates that error.
from jquip.
Just checked, and the tests don't seem too happy with the closure compiled version. It's going to need some work to get that corrected.
from jquip.
Did some work on making tests pass with closure. https://github.com/mythz/jquip/tree/closure-compat
So far the file size isn't too different from what UglifyJS provides (6.5k gzipped vs 6.6k).
from jquip.
Jason thanks for the help! Looks like jquip.js compiles now using ADVANCED w/ closure compiler.
I combined src/jquip.js & src/jquip.events.js using closure compiler advanced. I then called a $(document).bind() command when compiled I get this error (in a non-compiled version it works fine):
Uncaught TypeError: Object # has no method 'make' line: jquip/src/jquip.js:73 (using source mapping)
I prittified the compiled code to get a better idea of what's going on:
'''javascript
(function(window, undefined) {
var h = void 0, i = !0, j = null, l = !1, aa = window, ba = window;
function m(a, b) {
for (var c, d = 0, e = p.length; d < e; d++)
if (p[d].apply(this, arguments))
return this;
if (!a)
return this;
if (q(a))
return r ? a() : t.push(a), this;
if (v(a))
return this.make(a);
if (a.nodeType || w(a))
return this.make([a]); //<--- Uncaught TypeError: Object # has no method 'make'
if ("body" == a && !b && x.body)
return this.context = a.context, this[0] = x.body, this.length = 1, this.selector = a, this;
if (a.selector !== h)
return this.context = a.context, this.selector = a.selector, this.make(a);
a = y(a) && "<" === a.charAt(0) ? (c = ca.exec(a)) ? [x.createElement(c[1])] : z(a).childNodes : A(this.selector =
a, b);
this.make(a);
B(b) && this.attr(b);
return this;
...
'''
I thought maybe it was because I was combining my code & jquip into an anonymous closure but that doesn't seem to be the cause of the issue; i moved jquip code out of the closure and still got the same error. Any idea what's causing this error?
In your opinion should we use uglifyjs (not closurecompiler) when working on project that include jquip?
from jquip.
The reason for the missing 'make' error is that a good number of the functions are not exported correctly for closure and get optimized away.
I recommend using either uglifyjs or closure with simple optimizations until jquip works again with advanced optimizations.
from jquip.
Related Issues (20)
- seems bug in data method HOT 2
- Mouseenter/Mouseleave don't appear to work HOT 1
- children, siblings, etc. don't work with "tag.class" selectors
- .find() on mult-root document fragment gives warnings
- website not available? HOT 1
- Move loadAsync pieces out of core HOT 1
- Create Github Pages HOT 2
- use strict HOT 2
- Polyfill Array.prototype.slice in IE8
- Firing custom events in IE 8 does not work
- jQuery 1.9 and 2.0 (IE 6/7/8) HOT 1
- ajax cache HOT 3
- Mousemove events have no event target in IE8
- Missing 'if' in jquip.ajax at line 101
- Give jquip a handle function, in case a module needs to be loaded
- Make jquip aware of CommonJS/AMD
- Minor incompatibility with Bootstrap Accessibility Plugin
- jquip.fn.not() does the opposite
- does anyone knows how to upload images using jquip? i'm kind of stuck here. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquip.