Giter VIP home page Giter VIP logo

Comments (4)

kmalakoff avatar kmalakoff commented on August 9, 2024

Arron, thank you for the patch and enhancing my understanding of module loading! It is a little tricky to implement in CoffeeScript given the way they compiler joins and wraps the JavaScript, but I'll get on it today.

Out of curiosity, your patch says "Support three module loading scenarios" but there is not a [1]. Is there another scenarios I should also support?

Cheers,

Kevin

from knockback.

aaronfay avatar aaronfay commented on August 9, 2024

Hi Kevin,

My apologies, I didn't even read the comments. The factory code is borrowed from knockout.js, but I deleted the first condition in that branch which was a check for module.exports (node.js compatibility). Since I didn't see the need for it, I took it out.

You can see the source from knockout here, if you're interested:
https://github.com/SteveSanderson/knockout/blob/master/build/output/knockout-latest.debug.js

I also changed the factory(window['ko'] = {}); (3rd condition) the knockout version to factory.call(window) to be compatible with the context of your original code.

In that example, the DEBUG statement can come out too :) sorry for being so sloppy, I was at work, and in a bit of a rush towards the end of my day :)

If you have any other questions, please let me know,

Cheers!
Aaron

from knockback.

kmalakoff avatar kmalakoff commented on August 9, 2024

Thanks for clarifying...much appreciated!

I've taken a look and it might take me a little time to fix because I need to update the build process to get the wrapping to work with the CoffeeScript compiler (might think I will need to add a post-build wrapping step).

from knockback.

kmalakoff avatar kmalakoff commented on August 9, 2024

Hi Aaron,

I'm sure your work around is working fine in the short term, but I just updated the knockback repository. It was a bit tricky given the build process, but seems to be working: 4ea1f4d

I have a couple more things to do until I release 0.16.2 officially.

Cheers,

Kevin

from knockback.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.