Open rafaelnco opened 8 years ago
Generally speaking, you can't munch stuff that calls another library unless that can also be munched at the same time (does not always work, some things can't be munched properly with the current implementation). If what you use is already minimized, you should not spend too much time munching if it isn't working right. There is a way to exclude a list of keywords, if this makes sense for your situation? For instance, in the case of jquery there is a known list of keywords to exclude for everything to function properly. This is all from memory, I hope I have not made too much of an error. Regards, Arlus
On Sun, Jan 17, 2016 at 9:00 AM, Rafael Natã notifications@github.com wrote:
All the following functions can be found in jsdom level1/core.js file and fire an error when munchjs is executed.
level1/core.js:
set nodeName() { throw new core.DOMException();}, ... set lastChild() { throw new core.DOMException();}, ... set childNodes() { throw new core.DOMException();}, ... set nextSibling() { throw new core.DOMException();}, ...
Is there anyone who can help me with this?
Thanks in advance
— Reply to this email directly or view it on GitHub https://github.com/jmrocela/munchjs/issues/25.
Also, there is one basic fix to munch that others have published, it is the same in every case because it is needed. I can't remember but maybe did you also contribute to the repo?
On Mon, Jan 18, 2016 at 12:44 AM, Arlus Potter arlus.fp@gmail.com wrote:
On the other hand, munch does not recognize the full set of keywords, only the mostly used ones. If you wish to add support for more keywords, that is possible.
On Mon, Jan 18, 2016 at 12:40 AM, Arlus Potter arlus.fp@gmail.com wrote:
Generally speaking, you can't munch stuff that calls another library unless that can also be munched at the same time (does not always work, some things can't be munched properly with the current implementation). If what you use is already minimized, you should not spend too much time munching if it isn't working right. There is a way to exclude a list of keywords, if this makes sense for your situation? For instance, in the case of jquery there is a known list of keywords to exclude for everything to function properly. This is all from memory, I hope I have not made too much of an error. Regards, Arlus
On Sun, Jan 17, 2016 at 9:00 AM, Rafael Natã notifications@github.com wrote:
All the following functions can be found in jsdom level1/core.js file and fire an error when munchjs is executed.
level1/core.js:
set nodeName() { throw new core.DOMException();}, ... set lastChild() { throw new core.DOMException();}, ... set childNodes() { throw new core.DOMException();}, ... set nextSibling() { throw new core.DOMException();}, ...
Is there anyone who can help me with this?
Thanks in advance
— Reply to this email directly or view it on GitHub https://github.com/jmrocela/munchjs/issues/25.
I could take a look at a short example of the error if you like. With the munch command, the example munched file and the munched library file.
On Mon, Jan 18, 2016 at 12:48 AM, Arlus Potter arlus.fp@gmail.com wrote:
Also, there is one basic fix to munch that others have published, it is the same in every case because it is needed. I can't remember but maybe did you also contribute to the repo?
On Mon, Jan 18, 2016 at 12:44 AM, Arlus Potter arlus.fp@gmail.com wrote:
On the other hand, munch does not recognize the full set of keywords, only the mostly used ones. If you wish to add support for more keywords, that is possible.
On Mon, Jan 18, 2016 at 12:40 AM, Arlus Potter arlus.fp@gmail.com wrote:
Generally speaking, you can't munch stuff that calls another library unless that can also be munched at the same time (does not always work, some things can't be munched properly with the current implementation). If what you use is already minimized, you should not spend too much time munching if it isn't working right. There is a way to exclude a list of keywords, if this makes sense for your situation? For instance, in the case of jquery there is a known list of keywords to exclude for everything to function properly. This is all from memory, I hope I have not made too much of an error. Regards, Arlus
On Sun, Jan 17, 2016 at 9:00 AM, Rafael Natã notifications@github.com wrote:
All the following functions can be found in jsdom level1/core.js file and fire an error when munchjs is executed.
level1/core.js:
set nodeName() { throw new core.DOMException();}, ... set lastChild() { throw new core.DOMException();}, ... set childNodes() { throw new core.DOMException();}, ... set nextSibling() { throw new core.DOMException();}, ...
Is there anyone who can help me with this?
Thanks in advance
— Reply to this email directly or view it on GitHub https://github.com/jmrocela/munchjs/issues/25.
**TL;DR: I'm actually referring to the jquery 1.8.3 lib used by munchjs, not about munching jquery! Also, I'm using 2 fixes:
Hey @arlusf, thank you very much for your interest! I've detailed the issue here. I guess you've misinterpreted my issue with jQuery, as I'm referring to the one used internally by munchjs and, more specifically, to the jsdom 0.6.5 lib used by jquery 1.8.3, which is used by munch js. So, I'm not really talking about munching jquery, but instead I'm talking about the jquery 1.8.3 lib used by munchjs. Sorry for all this confusion!
Here's my current scenario:
$ cd ~
$ git clone https://github.com/jmrocela/munchjs.git
$ npm install -g .
note the . at the end of the line
note:
"jquery": "~1.8.3",
"jsdom": "~0.6.5"
$ cd /w/quickstart/src
$ munch --view index.html
The output is:
/usr/lib/node_modules/munch/node_modules/jquery/node_modules/jsdom/lib/jsdom/level1/core.js:418
set nodeName() { throw new core.DOMException();},
^^
SyntaxError: Setter must have exactly one formal parameter.
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:404:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/usr/lib/node_modules/munch/node_modules/jquery/node_modules/jsdom/lib/jsdom/level2/core.js:1:94)
at Module._compile (module.js:397:26)
at Object.Module._extensions..js (module.js:404:10)
All the following functions can be found in jsdom level1/core.js file and fire an error when munchjs is executed.
level1/core.js:
Is there anyone who can help me with this?
Thanks in advance