Giter VIP home page Giter VIP logo

Comments (5)

 avatar commented on May 14, 2024

Not all modules work with browserify. Anyhow you shouldn't need to require('coffee-script') since you can just require('./file.coffee') and browserify will automatically compile your file into javascript.

from browserify.

edmellum avatar edmellum commented on May 14, 2024

The coffee thing wasn't actually for compiling, but just to close this issue off properly I'll make sure I understand.

If I was making a page that was compiling coffee-script on the client side like an editor I'd need to manually include the JS into the Browserify bundle, right?

My actual use-case was trying to require Coffeekup, seeing as that didn't work because of Coffeescript I thought that was the issue. Looks like the problem is that Coffeekup checks for the existence of window to know if it's in the browser and if it is it doesn't include coffeescript. However I'm guessing that Detective just sees a require and doesn't care if it's in a if and requires it. Is there any way around this behavior or better way to do what Coffeekup is doing?

from browserify.

 avatar commented on May 14, 2024

You can call .ignore() if you don't want modules to be included in the bundle.

from browserify.

edmellum avatar edmellum commented on May 14, 2024

I can't believe I didn't think of that before. -.-

Problem now is that when I'm requiring Coffeekup on the client I just get an empty object. It looks like the compiled Coffeekup JS has a closure so there's a double closure since Browserify adds its own. Could this be the issue?

from browserify.

edmellum avatar edmellum commented on May 14, 2024

Problem was some more quirks in CoffeeKup.

from browserify.

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.