question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Simplify browserify bundles with `require` module

See original GitHub issue

I started work over the weekend to require modules within the dropchop source. This would be one of the first steps in removing the dependency on Gulp as we could run browserify as a npm one-liner rather than streaming each module through Gulp.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mapsamcommented, Aug 3, 2016

@nickpeihl all of dropchop is currently written in the “module pattern” (not to be confused with npm modules) and I always find this article super helpful in how to organize code, globals, and share across files: http://www.adequatelygood.com/JavaScript-Module-Pattern-In-Depth.html

Introducing require and browserify may or may not require us to re-architect how dropchop is written.

1reaction
nickpeihlcommented, Aug 2, 2016

@wboykinm I don’t think so. You could probably add each of the turf modules to this array instead of the main turf library. It’s worth a try since this issue might take a while.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Browserify
Browserify lets you require('modules') in the browser by bundling up all of your dependencies. Install Documentation · Source Code · Help + Articles...
Read more >
how to build modular applications with browserify - GitHub
You just need a build step and some tooling for source maps and auto-rebuilding. Plus, we can use node's module lookup algorithms to...
Read more >
Browserify Tutorial - Using require() In The Browser - YouTube
Learn how to use the require () function to import Javascript modules in the front-end part of your web application (in the browser)...
Read more >
multiple bundles with browserify, using modules externally
Reading about Webpack, I see where they solve so many questions including the one ... function(context, request, callback) { // Every module prefixed...
Read more >
Getting Started with Browserify - SitePoint
Browserify allows us to use node.js style modules in the browser. We define dependencies and then Browserify bundles it all up into a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found