Giter Club home page Giter Club logo

gmailjs-node-boilerplate's Introduction

GmailJS Node boilerplate

Node.js CI

This repo contains sample code to get a WebExtensions-based browser-extension using the gmail.js library.

Usage

First get the code and build it:

# get code
git clone https://github.com/josteink/gmailjs-node-boilerplate/

# get deps and build
cd gmailjs-node-boilerplate
npm install
# ensure you're running latest version!
npm update
npm run build

Now ensure the code loads and works:

  • Load the folder containing the extension (manifest.json) in your browser.
  • Load mail.google.com in your browser and open the developer console.

You should be greeted by a message saying the following

Hello, <you>. This is your extension talking!

If that works, you should now be ready to customize the extension-code. Do this by editing extension.js and rerunning npm run build.

You can also interact with a instance of Gmail.js ready for use. gmail should already be exposed in the developer console as a global variable.

You can use this to get familiar with the API.

Cheers!

Disclaimer

This project first and foremost about learning. It is NOT set up or configured as one would typically create a production WebExtension, and there are several things which can be changed or improved in how things are built and packaged.

This is an intentional choice.

The aim for this project is not to have a ready-to-use production setup with loads of complex dependencies and tool chain specific configurations.

Instead this project aims to demonstrate the absolutely simplest way possible one can embed Gmail.js in one's own extension, without introducing any other needless or complicating factors. Thus making it easier to adapt into your own projects and toolchains you already know well.

It's also meant as a simple way to test the gmail.js API and capabilities without having to setup anything of your own first.

Lastly it's also a simple playground where bug-reports can easily be reproduced or verified.

None of these goals aligns particularly well with having a pre-made, production-ready, size-optimized, security-hardened setup. And that's perfectly ok, especially for learning.

Regarding WebExtension Manifest versions

Gmail.JS and this boilerplate repo was originally developed when WebExtension Manifest V2 were in place. Thanks to the help of @tomer-regev this boilerplate repo now uses Manifest V3 instead.

If you for whatever reason still want to use the V2 code, check out the code back at ManifestV2-tag, which has been maintained for historical reasons.

Either way, Gmail.JS itself should work fine under both versions with no change required in your extension-code, unless your extension itself has code which needs to be migrated.

For more advice about upgrades, see the Chrome documentation.

gmailjs-node-boilerplate's People

Contributors

josteink avatar renovate-bot avatar renovate[bot] avatar tomer-regev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.