Coder Social home page Coder Social logo

forked's Introduction

forked

Fork all of the things

What?

Saw a tweet:

@kentcdodds Now wouldn't it be cool, if you could go into a repo in your node_modules and run `npm fork` and it would fork it on github.

— Merrick Christensen (@iammerrick) April 5, 2016

But why?

If you have ever needed to debug a node module you're using in your project it's a no brainer. If you find a bug in someone's project you might want to fix it and made a fork of it so you can then open a pull request.

Getting Started

First, you need an access token from github so forked can log in. You can find instructions for that here

Make sure to give your token public repo privileges.

Add repo privileges

Then add it to your .bashrc file, or whatever you use to manage your env variables:

export FORKED_TOKEN='PUT_YOUR_ACCESS_TOKEN_HERE'

Then install the module:

$ npm i -g forked

Dive into some random node module:

$ cd node_modules/react

Run the command:

$ fork

If it worked, you should be able to see the fork on GitHub. If you find a bug please document it in the issues :)

forked's People

Contributors

agarzola avatar deltaepsilon avatar eanplatter avatar iwritethings avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

forked's Issues

Fork named dependency

Thinking it’d be nice to do something like fork name-of-dep from a project’s root. Then, instead of using ./package.json it would look for ./node_modules/name-of-dep/package.json and use that to create a fork. Do you see value in this? If so, I’d love to take a crack at it later this week.

Cannot read property 'repo' of null

I’m getting this error after installing, navigating to a project dependency (on an unrelated project), and using fork:

/bin/sh: json: command not found
/usr/local/lib/node_modules/forked/dist/index.js:35
var index = meta.repo.indexOf('.git');
                ^

TypeError: Cannot read property 'repo' of null
    at Object.<anonymous> (/usr/local/lib/node_modules/forked/dist/index.js:35:17)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Function.Module.runMain (module.js:467:10)
    at startup (node.js:136:18)
    at node.js:963:3

I also noticed that line #33 seems to be missing something, which may be related. I haven’t used babel yet, though, so I might just be missing something here.

Similar project: gfork

I've created a similar project: gfork. It offers all functionalities of this project, and more. Check it out! :)

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.