Giter VIP home page Giter VIP logo

broccoli-browserify's People

Contributors

erithmetic avatar gingerhendrix avatar mjackson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

broccoli-browserify's Issues

Use cache for faster bundles?

Thanks for making this plugin, it's really useful.

We're using it with a fairly complex app, and it takes several seconds for browserify to do its thing. With watchify that wouldn't be a problem, because with each change, only the updated files get reparsed. But with broccoli, the write() function is called whenever the input tree is modified, and the whole tree has to be parsed and bundled, making the feedback loop too slow.

Given broccoli's architecture and stated objectives it seems as though there ought to be a way to do incremental rebundles, similar to watchify. But it's not obvious how to go about it. Before I spend the next few days tearing my hair out, I thought I'd raise the issue here and see if you'd had any thoughts about how that might work?

add shim config?

Would be great to have right in the options :)

can probably steal from grunt-broccoli to make it happen.

Support for directory as entry point

Hello,
I can not figure out how to set a directory as entry point. I would like to browserify all files inside that directory. Is it possible?

Doesn't seem to do standalone properly

I can't get a standalone output to work properly. Using the cli i get the proper output, but not with this.

var myTree = browserify('lib', {
           entries: ['./retriable-promise.js'],
           browserify: {
             standalone: 'retriablePromise'
           }
         });

does not output the same as running

browserify lib/retriable-promise.js --standalone retriablePromise

anyone have any insight as to why that is?

I can't get this to work.

I get very cryptic unhelpful errors when I try to use this.

My extremely simple Brocfile.js is:

module.exports = function (broccoli) {
  var browserify = require('broccoli-browserify')
    , sourceTree = broccoli.makeTree('src')

  sourceTree = browserify(sourceTree, {entries: 'client.js'})

  return sourceTree
}

And the errors I get are:

Error: Cannot find module 'c' from 'src'
    at /Users/chris/Sites/room.js.new/client/node_modules/broccoli-browserify/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:44:17
    at process (/Users/chris/Sites/room.js.new/client/node_modules/broccoli-browserify/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:110:43)
    at /Users/chris/Sites/room.js.new/client/node_modules/broccoli-browserify/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:119:21
    at load (/Users/chris/Sites/room.js.new/client/node_modules/broccoli-browserify/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:54:43)
    at /Users/chris/Sites/room.js.new/client/node_modules/broccoli-browserify/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:60:22
    at /Users/chris/Sites/room.js.new/client/node_modules/broccoli-browserify/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:16:47
    at Object.oncomplete (fs.js:97:15)

The odd and cryptic part of it is that the "module" letter (in this case c) is sometimes different, and the "from" part is always the name as the sourceTree directory name. Am I just using this wrong?

broccoli-browserify broccoli-watchify unification

Hello, this project doesn't appear to be maintained any longer. I would like to offer adopting the project. I have just released broccoli-watchify 1.0.0 which addresses most (or all) of the open issues for this project. What is is lacking, is the canonical and easy to find name broccoli-browserify.

Anyways, I would love to merge these projects, given all the original authors the attribution they deserve, but give our users a single easy to find node_module "that just works".

similar request just opened at broccoli-fast-browserify caleb/broccoli-fast-browserify#23
Let me know.

Error when creating bundle

I get an error TypeError: Arguments to path.join must be strings when I try and build simple bundle.

Here is my current Brocfile.js

  var compileBrowserifyBundles = require('broccoli-browserify');
  var pickFiles = require('broccoli-static-compiler');

  var browserifyAssets = 'assets/jsBundles'
  browserifyAssetsTree = pickFiles(browserifyAssets, {
    srcDir: '/',
    files: ['**/*.js'],
    destDir: 'jsBundles/' // All files are served from "jsBundles/"?
  });

  // Process changes
  browserifyAppJs = compileBrowserifyBundles(browserifyAssetsTree, {
    entries: ['./jsBundles/bundleJs.js']
  });

  return browserifyAppJs;

Here is the error stack

tmp/static_compiler-tmp_dest_dir-S8uJchOO.tmp { basedir: 'tmp/static_compiler-tmp_dest_dir-S8uJchOO.tmp' }

path.js:360
        throw new TypeError('Arguments to path.join must be strings');
              ^
TypeError: Arguments to path.join must be strings
  at path.js:360:15
  at Array.filter (native)
  at Object.exports.join (path.js:358:36)
  at /Users/rob.munro/git/test/node_modules/broccoli-browserify/lib/index.js:40:29
  at /Users/rob.munro/git/test/node_modules/browserify/index.js:299:22
  at /Users/rob.munro/git/test/node_modules/browserify/index.js:299:22
  at /Users/rob.munro/git/test/node_modules/browserify/index.js:327:13
  at ConcatStream.<anonymous> (/Users/rob.munro/git/test/node_modules/browserify/node_modules/concat-stream/index.js:32:43)
  at ConcatStream.EventEmitter.emit (events.js:92:17)
  at finishMaybe (/Users/rob.munro/git/test/node_modules/browserify/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js:450:14)
  at afterWrite (/Users/rob.munro/git/test/node_modules/browserify/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js:330:3)
  at /Users/rob.munro/git/test/node_modules/browserify/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js:317:9
  at process._tickCallback (node.js:415:13)

Cannot provide browserified versions of all the files in a directory

Would be great if i could just specify a broccoli tree and browserify all files in specific directory (similar to the broccoli-coffeescript module)

eg.

  var filterCoffeeScript = require('broccoli-coffee');
  var compileBrowserifyBundles = require('broccoli-browserify');
  var pickFiles = require('broccoli-static-compiler');

  // Build up coffee assets tree for browserify
  var browserifyAssets = 'assets/jsBundles'
  browserifyAssetsTree = pickFiles(browserifyAssets, {
    srcDir: '/',
    files: ['**/*.coffee'],
    destDir: 'jsBundles/' // All files are served from "jsBundles/"?
  });

  // Convert those coffee assets into js
  browserifyAssetsTree = filterCoffeeScript(browserifyAssetsTree, {
    bare: false
  });

  // Build all js files in particular directory
  browserifyAppJs = compileBrowserifyBundles(browserifyAssetsTree, {
    dir: 'jsBundles/'
    outputDir: 'js/
  });

return browserifyAppJs

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.