Coder Social home page Coder Social logo

Comments (5)

evoker avatar evoker commented on May 28, 2024

@brunnurs Hi, how did you get this to work with browserify? I'm having a hard time getting to work.

Any tips?

from angular-file-saver.

brunnurs avatar brunnurs commented on May 28, 2024

AFAIK you can't browsify a dependency if it doesn't support the CommonJS-standard (or at least a "light" version of it). It still include the angular-file-saver without browsify. If you have time, you might implement a PR to support this feature. I will implement it for another repo (https://github.com/allenhwkim/angularjs-google-maps) so maybe if it's an easy task, i might also implement a PR for this repo. But not sure yet, as a little low on time :-)

from angular-file-saver.

alferov avatar alferov commented on May 28, 2024

Sorry for the delay guys.
This project does support CommonJS as it's being exported as a CommonJS module:
https://github.com/alferov/angular-file-saver/blob/master/dist/angular-file-saver.bundle.js#L1

@brunnurs, @evoker, Do you use Windows?

from angular-file-saver.

evoker avatar evoker commented on May 28, 2024

@alferov Yes, currently on a windows machine.

from angular-file-saver.

brunnurs avatar brunnurs commented on May 28, 2024

@alferov You are absolutely right, the project supports CommonJS and Browserify is also able to include your project. The missing piece is the line:

module.exports = 'ngFileSaver';

which enables angular to add your project as module- dependency (see my code above). I will create a PR with the update.
With this small improvements, it works for me like a charm.

from angular-file-saver.

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.