Skip to content

Local build setup

Eduardo Fungairino edited this page Jan 23, 2024 · 41 revisions

Part of the Getting started guide.

Requirements

  • Mac/Linux environment (builds on Windows might not work due to path handling)
  • Node 16
  • pre-commit to manage git hooks. brew install pre-commit

Optional:

  • nvm to manage multiple node versions on your machine
  • web-ext to launch the extension in a separate browser profile. npm install --global web-ext

Clone this Repository

git clone https://github.com/pixiebrix/pixiebrix-extension.git
cd pixiebrix-extension

Install Dependencies and Pre-commit Hooks

npm install
pre-commit install

Environment Configuration File

Create a .env.development file to hold custom environment variables for development builds.

If you'd like to use values corresponding to the official PixieBrix deployment, contact a project maintainer:

# This key is used for the `key` entry in the Chrome extension manifest to make the extension id match what's 
# expected by app.pixiebrix.com
# @see https://developer.chrome.com/docs/extensions/mv2/manifest/key/
CHROME_MANIFEST_KEY=
CHROME_EXTENSION_ID=

# (Optional) used to retrieve API definitions and authenticate with Google Sheets, BigQuery, etc.
GOOGLE_API_KEY=
GOOGLE_OAUTH_CLIENT_ID=
GOOGLE_APP_ID=

Using a Local API

If you are developing against PixieBrix API locally, also set the SERVICE_URL environment variable:

# PixieBrix URL
SERVICE_URL=http://127.0.0.1:8000

Build

You can learn how to build the extension and how to load it into the browser.