Skip to content
This repository has been archived by the owner on Sep 17, 2023. It is now read-only.

QWERKY-Inc/markurz-extension

Repository files navigation

Getting Started

Default env file

REACT_APP_LOGIN_URL=http://localhost:3000
REACT_APP_COOKIE_DOMAIN=localhost
REACT_APP_COOKIE_NAME=next-auth.session-token
REACT_APP_BACKEND_URL=http://localhost:4000
# Should match the BE GQL_SCHEMA_TOKEN value
GQL_SCHEMA_TOKEN=mySecret
# Should match FE NEXTAUTH_SECRET secret value
REACT_APP_NEXTAUTH_SECRET=mySecret

Running without building

It is possible to run the extension without having to build every time. To do so, add the env value

REACT_APP_SIMULATE_LOCALLY=1

Then, run the project with yarn start. Once done, go to your Application tab of your browser and add a token=<value> inside the Local Storage. Once the page is reloaded with a valid token, you should appear logged in.

To build the package with Rollup, you will need to rename src/rollup.ts to src/index.ts before build.

Installation

As an external package

Markurz can be embedded within other Node.js based projects, by running yarn add @qwerky-inc/markurz-extension

Chrome

  • chrome://extensions
  • Enable developer mode
  • "Load unpacked"
  • or drag & drop the build folder into the extensions

Opera

  • opera://extensions
  • Enable developer mode
  • "Load unpacked"

Firefox

  • about:addons
  • Settings (cog button) install Add-on from file

Safari

Available Scripts

In the project directory, you can run:

npm run build

To build the project, this variable should be set in your environment.

INLINE_RUNTIME_CHUNK=false

Builds the app for production to the build folder, through craco.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\

See the docs about craco for more information.

Github Automation