Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Nils Magnus Djupvik
    @nmdjupvik_twitter
    @jlaustill I tried browserify-css without getting it to work. I got it working by using rework and then recursively copy the images to the bundled folder. I'll probably try using Stylus and then base64 encode the images into the css.
    Joshua Austill
    @jlaustill
    @nmdjupvik_twitter here's the code for making browserify-css work, it's pretty straight forward once you realize their documentation just sucks lol https://github.com/jlaustill/Filemanager-2.0/blob/master/gulpfile.js
    Nils Magnus Djupvik
    @nmdjupvik_twitter
    @jlaustill Thanks! I'll definately have a look at the code. I'm trying really hard to make a pure npm setup, so I'm not using gulp or grunt atm.
    Joshua Austill
    @jlaustill
    I haven't tried it without gulp, let me know how that goes
    Nils Magnus Djupvik
    @nmdjupvik_twitter
    @jlaustill Have you tried parcelify? I'm currently using it, but just havent figured out a good solution for the images yet. Ditching gulp/grunt made alot much easier. The script is also shorter, easier to read and maintain. If you run on multiple platforms you might run into issues, but apart from that it's really nice. You can have a look at this (among several) articles: https://medium.freecodecamp.com/why-i-left-gulp-and-grunt-for-npm-scripts-3d6853dd22b8#.44vj0lkpt
    Joshua Austill
    @jlaustill
    This idea intrigues me. I used requirejs for years, but recently it has become unsupported as all the plugin developers have left to other webpack or browserify. I gave up on webpack FAST, it's horrible. I got browserify to work in a couple of days with full parity to my requirejs build. With one big exception, it will NOT build on Windows lol
    joelnet
    @joelnet
    I am trying to get browserify working solely with memory streams. I do not want any access to the file system at all.
    const browserify = require('browserify')
    const path = require('path')
    const intoStream = require('into-stream')
    
    const oneStream = intoStream('var two = require("./two")')
    oneStream.file = path.resolve('index.js')
    const twoStream = intoStream('console.log("Hello from two.js")')
    twoStream.file = path.resolve('two.js')
    
    browserify({
            entries : [ oneStream ],
            basedir: path.resolve('.')
        })
        .require(twoStream)
        .bundle((err, res) => {
            if (err) console.log(err.message)
        })
        .pipe(process.stdout)
    The error I am seeing is Cannot find module './two' from '...'
    Looking inside the require method, I found that it does accept streams as a valid input.
    Nils Magnus Djupvik
    @nmdjupvik_twitter
    I'm bundling my Angular project using Browserify. Does anyone know a way to force the order in which the scripts are ordered? Angular, as you might know, requires a specific load order of the scripts.
    Joshua Austill
    @jlaustill
    @nmdjupvik_twitter They are loaded in the order in which you require them.
    Nils Magnus Djupvik
    @nmdjupvik_twitter
    @jlaustill I does not seem so...
    it
    I have something like a -> b -> c, but then c gets loaded before b
    I meant b
    before c
    and that's a problem
    Nils Magnus Djupvik
    @nmdjupvik_twitter
    Ahhh I found it. I missed a require statement.
    @jlaustill Thanks for putting me on the right path :)
    Joshua Austill
    @jlaustill
    Anytime, I got caught by that one myself when I switched :smile:
    Nils Magnus Djupvik
    @nmdjupvik_twitter
    my mystery was that it worked when I included another module
    with the same dep
    now that makes alot of sense as that module had the require statement
    Joshua Austill
    @jlaustill
    Yup, I got in the habit of just including every require unneeded for each file, it's smart enough to only load them once
    I needed lol
    Nils Magnus Djupvik
    @nmdjupvik_twitter
    I wanted less mess :)
    I think I'll love this eventually. We now move from manually fix everything (meaning no wiredep either) to using browserify
    and from using bower + grunt/gulp + npm ++ to mainly using npm and browserify
    dopplereffectt
    @dopplereffecctt_twitter
    Hi everyone! I'm new to browserify and I can't seem to figure out how to get two bundles with external (app.js & vendor.js) to work with files. My setup works if I do bundler.require('lodash') in my vendor gulp task, but with bundler.require('./libs/a.js') the resulting vendor.js has the full path to a.js, so that only require('full/path/to/a.js') works.
    How can I get require('./a.js') to work? I tried fullPaths: false (no effect) and exposing a.js as a, but then require('a') throws Cannot find module 'a' during app.js bundling.... help?
    dopplereffectt
    @dopplereffecctt_twitter
    Ah, got it now, instead of bundler.external(require.resolve('./lib/a.js') I'm just supposed to use the filename bundler.external('./lib/a.js')... so many hours wasted on this!
    Joshua Austill
    @jlaustill
    @dopplereffecctt_twitter I find the documentation for browserify, requirejs, and webpack to be just absolutely HORRIBLE. I feel your pain :(
    jacobus-brogly
    @jacobus-brogly
    ParseError: 'import' and 'export' may appear only with 'sourceType: module'
    why am i getting this error?
    and no I didnt update babel
    Michael Chang
    @mflux
    hey all, is there a command line equivalent for browserify's incremental build?
    I'm using wzrd.js to pass args into browserify so that it does an es6 build, but each build is 5+ seconds
    David Guttman
    @davidguttman
    @mflux I can't remember if wzrd does incremental, but watchify and budo do
    this isn't answering your question, but I used to use wzrd, but now prefer budo
    Michael Chang
    @mflux
    ah you know what, maybe I should use budo instead thanks @davidguttman
    Michael Chang
    @mflux
    yeah that is waaaay better
    jacobus-brogly
    @jacobus-brogly
    I remember reading something simular with bower, but webpack....
    I just want to have 2 files in my module directory, index.js and web-index.js, in node you ... it defaults to index.js, but for web it shoul duse web-index.js
    how to do this?
    Mohamad Qaddura
    @msqaddura
    hello guys hope everyone is doing well and hopefully i cna find an answer
    image.png
    image.png
    so we want to make our own custom library, the problem is that when we bundle it, then we import it in another project
    so basically first project is the library (howler-custom) we generate howler-custom.js bundle... in the second project we import the bundle, in second project it keeps giving this error
    that Cannot Find module ('any module used in the library') and inside the bundled file i can see that there are require() calls for all files we have in the custom project
    is there a step I am missing in order to allow the bundle to be imported in other projects?
    Mohamad Qaddura
    @msqaddura
    @jacobus-brogly jacob you need this line
    1)browserify -t [ babelify --presets=es2015 ] if you are using from cli
    2) .transform(babelify,{presets: ['es2015']}) if you are using gulp
    3) transform:[['babelify', { presets: ['es2015']}] if oyu are using browserify
    Silviu Bogan
    @silviubogan
    Hi! I have a problem with tsify and modules. If someone can help me I would be very happy. The repo is here: https://github.com/silviubogan/testing-modules-with-tsify . Thanks.