Forking & Renaming

In notebook:
FrontEndMasters Creating an Open Source JavaScript Library on Github
Created at:
2017-07-18
Updated:
2017-07-19
Tags:
Webpack libraries JavaScript

##Time to fork

###Exercise

  • Fork GitHub Repo
  • Rename Fork
  • Add to travis-ci.org (runs the tests and linting)
  • Update remote: git remote set-url origin https://github.com/user/repo.git
  • Create Travis.yml
  • Rename package in package.json
  • Update starwars-names.json kcd.im/fem-names
  • git commit
  • git push

The end goal is that you can publish your own version of the library.

###Automating the release process

This is really awesome.

###Fork the repo

Goes to GitHub and forks his repo. Now you can clone or download. The url will have your own username. Changes the Repository name to github-names. Now you can clone it.

shows command $ git ls-remote

Shows where your repo is pointing to. $ git remote set-url origin [paste-your-remote-url] This will set the origin to your repo. We just change the origin-remote url.

Since you forked it, all your branches etc should be the same and should work. Now you can update it to make it yours.

Now, you also have to update your package.json file with your own urls and usernames.

He chooses "GitHub-names" for his repo so he updates all the files and properties to this name. Also in the webpack.config.babel.js you have to change the library name to the new name. :

output: {
    path: join(__dirname, 'dist'),
    libraryTarget: 'umd',
    // **** 1.the new name ↴
    library: '[the new name]',
  },

Now, the last step is to update your JSON list with the new names.