-
-
Notifications
You must be signed in to change notification settings - Fork 27
Hacking on TabFern
Chris White edited this page Dec 19, 2018
·
7 revisions
At the moment, TabFern has a split personality: the master
branch and the switchover
branch are different.
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.
- Fork this repo and clone your fork to your local machine.
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.
- 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.
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.