Git Product home page Git Product logo

ng-chrome-extension's Introduction

@larscom/ng-chrome-extension

npm-release @larscom/ng-chrome-extension license npm

Easily create Google Chrome Extensions (v3) using the latest version of Angular.

The following scenarios/options are supported:

  • Popup ✓
  • New Tab ✓
  • Options ✓
  • Service Worker ✓
  • Content Page ✓

How to install

npm install -g @larscom/ng-chrome-extension

Start creating a new project

ng-chrome

alt text

How to use/develop

  • change directory to your newly created project
  • run npm run start
  • goto: chrome://extensions in the browser and enable 'developer mode'
  • press Load unpacked and target the folder angular/dist

The project is automatically being watched, any changes to the files will recompile the project.

NOTE: changes to the content page and service worker scripts requires you to reload the extension in chrome://extensions

alt text alt text

Build/package for production

  • update version number inside ./angular/src/manifest.json
  • run npm run build:production
  • upload extension-build.zip to the chrome webstore.

This will run a production build and will automatically zip it as a extension package in the root folder named: extension-build.zip

Debugging

Run: npm start

Go to: Developer tools (inspect popup) => Sources => webpack

You can find your source files (TypeScript) over there.

Angular folder

This folder contains the angular source code. Each feature (popup,options,tab) lives inside its own module and gets lazily loaded.

see: ./angular/src/app/modules

Chrome folder

This folder contains the content page/service worker scripts.

ng-chrome-extension's People

Contributors

dependabot[bot] avatar larscom 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.