-
-
Notifications
You must be signed in to change notification settings - Fork 27
Hacking on TabFern
At the moment, TabFern has a split personality: the master
branch and the switchover
branch are different.
If you have never used git before, there are lots of tutorials online. I found Think Like a Git very helpful. Remember that whatever you do on your local copy won't mess up anyone else, so you can relax :) .
The master
branch is what is currently deployed through the Chrome Web Store. Developing on it is easy: all you need is a Git client and a Web browser.
- Install Git. (One way is through GitHub Desktop.)
- Fork this repo and clone your fork to your local machine.
- Create a new branch on your local machine (e.g.,
git checkout -b mybranch origin/master
) - Load the
tabfern/
tree as an unpacked extension. - Hack away!
- After you make changes to files in
tabfern/
, refresh the TabFern or settings window to see them.
The master
branch is currently only receiving security updates or small releases.
Ignore the webstore/
tree --- that is updated manually on release.
This is the main branch of development. It is called that because we are switching over from the model above to a Brunch-based workflow. See below for why. Developing on the switchover
branch involves:
- Install Git. (see above)
- Install node.js. It comes with
npm
. - At a command line,
npm install -g npx
. - Fork this repo and clone your fork to your local machine.
- Create a new branch on your local machine (e.g.,
git checkout -b mybranch origin/master
) - At a command prompt (
cmd
orbash
, whichever works),cd
to the directory where your fork is. - Run
npm install
. This will download all the other packagesswitchover
uses. - Run
npx brunch w
. This will buildapp/
and the other directories in the branch intopublic/
. It will also leavebrunch
running. (To build but not leavebrunch
running, saynpx brunch b
.) - Load
public/
as an unpacked extension. - Hack away! As you make changes,
brunch
will automatically rebuild the files inpublic/
. - After you make changes to any files, refresh the TabFern or settings window to see them.
Why all the extra complication? Two reasons:
- It permits us to use npm packages much more easily. (It also permits more easily keeping those packages up to date!)
- It gives us flexibility to adjust the build for other targets, such as Firefox (#100).
Once you have experience with this workflow, I think you will find it works fairly well.