You will need Docker or Node, Yarn, Golang and dep installed.
- Run
maketo fetch all dependencies and compile both front-end and back-end code
OR
- Run
make depsto download all dependencies (you don't need to run this very often) - Run
make jsto compile only front-end code- Run
make prettierto additionally auto-format the code (this helps keeping code style consistent)
- Run
- Run
make browserpassto compile only back-end code
The commands above will generate unpacked extensions for both Firefox and Chrome and compile the Go binaries for all supported platforms.
- Run
./install.shor./install.ps1to install the compiled Go binary - For Chrome:
- Go to
chrome://extensions - Enable
Developer mode - Click
Load unpacked extension - Select
browserpass/chromedirectory
- Go to
- For Firefox:
- Go to
about:debugging#addons - Click
Load temporary add-on - Select
browserpass/firefoxdirectory
- Go to
The Dockerfile will set up a docker image suitable for running basic make targets such as building frontend and backend.
The crx target is not supported by now (therefore release target will not work).
To build the docker image run the following command in project root:
docker build -t browserpass-dev .To build browserpass (frontend and backend) via docker, run the following from project root (this is the preferred approach):
docker run --rm -v "$(pwd)":/browserpass browserpass-devIf you only want a specific action, such as to download dependencies or to build front-end or backend code, use one of the following commands:
docker run --rm -v "$(pwd)":/browserpass browserpass-dev deps
docker run --rm -v "$(pwd)":/browserpass browserpass-dev js
docker run --rm -v "$(pwd)":/browserpass browserpass-dev browserpassVagrant will set up a virtual machine with all dependencies installed for you. Your local working directory is shared into the VM. These instructions will walk you through the process of setting up a build environment for browserpass using Vagrant on Debian/Ubuntu. These instructions were valid for an Ubuntu 16.04 host. This only addresses building the Linux 64-bit binary - you'll need to faff around a bit to do other things, but this should provide you with a good starting point.
Install vagrant:
$ sudo apt-get install vagrantStart the VM:
$ vagrant upJump into the VM and build the project:
$ vagrant ssh
vagrant@minimal-xenial:~$ cd go/src/github.com/dannyvankooten/browserpass
vagrant@minimal-xenial:~/go/src/github.com/dannyvankooten/browserpass$ make js
vagrant@minimal-xenial:~/go/src/github.com/dannyvankooten/browserpass$ make browserpass-linux64Exit the build environment, clean up the vagrant image.
vagrant@minimal-xenial:~/go/src/github.com/dannyvankooten/browserpass$ exit
$ vagrant destroy
[ Vagrant tells you about stopping and removing the VM ]- Fork the repo
- Create your feature branch
git checkout -b my-new-feature
- Commit your changes
git commit -am 'Add some feature'
- Push to the branch
git push origin my-new-feature
- Create new pull Request