Coder Social home page Coder Social logo

mapify's People

Contributors

lo1tuma avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mapify's Issues

Multiple bundles?

I have multiple bundle targets in my project. How can I use mapify in this case? The examples in the README assume a project with only one bundle.

My project structure is:

project->
  src->
    target1/index.js
    target2/index.js

I want the src directory to be the root for require('src/*') calls. I tried:

browserify(__dirname+'/src/'+targetName)
      .plugin('mapify', {
          cwd: '../',
          pattern: '**/*.js',
          expose: 'src'
      })
      .bundle()

But that didn't work...

File Path Seperator on Windows

Hey, neat little plugin you've got. I noticed on Windows the aliases are being resolved with \ seperators, which means that require('../../../some/path') becomes require('some\\path'). This also makes the tests fail on Windows.

I didn't include a pull request because I'm not sure what the best way to solve this is. It's technically correct to use the Windows seperators...but a bit confusing when the aliases use different seperators than the programmer. However, a global replace on the seperators to force / doesn't sound too great either. I thought maybe I could parse out the seperator in the unaliased path, but I couldn't think of a way to do that without allowing false positives from the filename (some\ file.txt for example; note the escaped space, which I think is valid on *nix systems). Any thoughts?

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.