Coder Social home page Coder Social logo

Comments (4)

niksy avatar niksy commented on June 1, 2024

Hm, strange, I haven’t tried it on projects without browserify-shim so I haven’t encountered this error. I have browserify-shim as dev dependancy in this module so it won’t be installed when installing from npm by default.

Easiest way to have it be required as it should is to install browserify-shim as dev dependancy in your project and it should be picked up as usual. But maybe I should revise this module and remove browserify-shim as dependancy altogether and leave shimming on per project basis (or move browserify-shim to standard dependancy).

from throttle-debounce.

niksy avatar niksy commented on June 1, 2024

@realph I’ve pushed new version which applies browserify-shim only for standalone build. Shimming is there only because standalone builds don’t pack whole jQuery but expect it to already be available in global namespace. For every CommonJS build process (Browserify, Webpack, etc.) developers should take care to partialize their bundles (I suppose you already do this as part of bundling process).

Can you confirm that it’s working now?

from throttle-debounce.

alexgorbatchev avatar alexgorbatchev commented on June 1, 2024

This module doesn't seem to be meant to work outside of browser/jquery environment, which is a shame since there's absolutely no reason to tie this to jquery. It should really export proper functions and let consumer decide how and where to bolt them onto if there's a need.

For convenience, standalone version is also provided and it maps to jQuery namespace if it exists, otherwise it adds two methods to global (window) namespace.

from throttle-debounce.

niksy avatar niksy commented on June 1, 2024

Hey @alexgorbatchev, sorry for super late reply!

I’ve just pushed new major release which remove jQuery as dependancy, doesn’t rely on Browserify and shimming and works as standard CommonJS module. Hope this solves your issue!

from throttle-debounce.

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.