Giter Site home page Giter Site logo

Comments (5)

Sinewyk avatar Sinewyk commented on August 19, 2024

Oh yeah. That's it, some kind of path issue. My first file is in the object as a relative path

process.cwd() === '/home/sinewyk/dev/repo'
'./app/scripts/main.js'

while it's trying to get '/home/sinewyk/dev/repo/app/scripts/main.js'

all others entries in the object have the correct expected form by disc, that is stuff like

'/home/sinewyk/dev/repo/node_modules/underscore/underscore.js'

Any ideas where it could be coming from ?

from disc.

Sinewyk avatar Sinewyk commented on August 19, 2024

Ok ... fixed, I just needed to send an absolute path into browserify instead of a relative one, so that the entry file also had an expected absolute path instead of a relative one.

Maybe edit the readme, fullPaths: true needed, AND send and absolute path down the browserify bundle API.

from disc.

hughsk avatar hughsk commented on August 19, 2024

@Sinewyk this is a bug in browserify – maybe you should open an issue or PR to have the supplied path made absolute when using fullPaths?

from disc.

cowwoc avatar cowwoc commented on August 19, 2024

@Sinewyk I am running into the same problem. Did you open a bug report with Browserify? If so, where?

from disc.

Sinewyk avatar Sinewyk commented on August 19, 2024

Oh my bad. I bypassed the problem. I had a "classic" browserify workflow with all my custom things that worked. And then I simply run disc on the result file with --open.

Exactly like that (for example with gulp, but you can do that with anything really).

gulp.task('deps-tree', ['browserify'], function() {
    var discSpawn = spawn('./node_modules/.bin/discify', ['./app/assets/scripts/bundle.js', '--open']);

    discSpawn.on('close', function() {
        process.exit(0);
    });
});

don't forget to send fullPaths: true as option inside the browserify command.

from disc.

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.