It gives users the options to choose if they do or not. In some circumstances it is not OK to extend natives and in these cases MooTools could not be used. Now, you could if you wanted.
On 17 Apr 2012, at 14:40, Olivier El Mekki wrote: > Does this ghost module means Mootools takes back its stance that > extending native is ok ? > > On 14:35 Sun 15 Apr , Arian Stolwijk wrote: >> In the examples _ refers to the ghost module. >> As you might know, native prototypes are not extended. However if you like >> chaining methods, ghost is the solution. >> For example see the last example >> of [1]http://jsfiddle.net/fakedarren/jmvvp/ >> On Sun, Apr 15, 2012 at 2:33 PM, Arian Stolwijk >> <[2]stolwijk.ar...@gmail.com> wrote: >> >> Not really. All files are commonjs modules, so use require() and >> module.exports etc. >> To expose stuff for the demos, Darren used this >> main.js [3]https://gist.github.com/30505a5a98de236e6239 that exposes >> stuff on a mootools object. >> So it will depend on users will build their code, either use the modules >> all the way. That way you don't really need any global variables at all, >> or use something like that main.js that exposes the API on some global >> variables and use it in a more traditional way. >> To build the code, you could follow those steps: >> # make sure you have a recent version of node.js >> npm install -g wrapup # like Packager, but for cjs modules >> mkdir moo2 >> cd moo2 >> # get the npm packages >> npm install prime >> npm install nodes >> npm install slick >> npm install moofx >> # get the example main.js >> curl >> [4]https://raw.github.com/gist/30505a5a98de236e6239/dcb712225a5185b07c728b9cc67beec82a8a5740/main.js >> > >> main.js >> # build the file >> wrup -r ./main.js > moo.js >> Once you got the hang of it, and are familiar with npm, it's really >> easy. The idea is to provide some build system on the website, like >> mootools always had. >> On Sun, Apr 15, 2012 at 2:06 PM, tofu <[5]enrique.e...@gmail.com> wrote: >> >> really cool! >> one question what is mootools._ ? does that have any relation to >> underscorejs? >> On Apr 13, 3:23 pm, fakedarren <[6]darren.wadd...@gmail.com> wrote: >>> Hey y'all >>> >>> Here are some MooTools 2 examples for anyone >>> interested:[7]http://jsfiddle.net/user/fakedarren/fiddles/ >>> >>> It is still early work, and the API is still being worked on, but it >>> hopefully shows how some of the really basic, core features might >> work. >>> >>> Cheers >>> Darren >> >> References >> >> Visible links >> 1. http://jsfiddle.net/fakedarren/jmvvp/ >> 2. mailto:stolwijk.ar...@gmail.com >> 3. https://gist.github.com/30505a5a98de236e6239 >> 4. >> https://raw.github.com/gist/30505a5a98de236e6239/dcb712225a5185b07c728b9cc67beec82a8a5740/main.js >> 5. mailto:enrique.e...@gmail.com >> 6. mailto:darren.wadd...@gmail.com >> 7. http://jsfiddle.net/user/fakedarren/fiddles/ > > -- > Olivier El Mekki.