-
Visual Studio Code: https://code.visualstudio.com/
-
This setup assumes you are using a Bash terminal.
- Clone this repository using the following command, or if you are working with a downloaded
.zipof the source code, skip this step:
git clone https://github.com/mq022002/Looker.git- Run the following bash script to install dependencies and build the application source code in runnable JavaScript:
sh setup.sh-
Set up your
.env. There is a file infunctions/called.env.templatethat provides what you will need. -
Hardcode the API Key into the
extension-looker/api/functions. Reason being, the Visual Studio Code extension is not able to resolve environment variables and it has been something that I have not been able to figure out. -
Boot up a local development instance of Firebase Functions emulator using the following command:
npm run serve- Alternatively, you can also set the
API_ENVvairable in theextension-looker/utils/getBaseApiUrlfunction to production to use Firebase endpoints.
- Once you have your functions running (these need to be running, or publicly exposed in production), you can boot up the Visual Studio Extension in local. Navigate to
extension-looker/src/extension.tsand clickF5.
-
Once you are in the testing window for the VS Code extension, open the folder
LookerTesting. You should see the files contained within inside of the file tree. -
Create and activate a virtual environment using the following command applicable to your system:
# Linux
sudo apt-get install python3-venv # If needed
python3 -m venv .venv
source .venv/bin/activate
# macOS
python3 -m venv .venv
source .venv/bin/activate
# Windows
py -3 -m venv .venv
.venv\scripts\activate- Install requirements using the following command, ensuring your virtual environment is installed with
(.venv)prepending your CLI:
pip install -r requirements.txt- Use
CTRL + SHIFT + Pto access the commands associated with this extension. All are prepended withLooker:so you can type that in to find them fast.