Skip to content

ebizbase/chrome-extension-angular

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chrome Extension Angular Boilerplate

Chrome Extension starter using Nx workspace and Angular.

📖 Table of Contents

✨ Features

✅ Nx Workspace

✅ Angular

✅ Tailwind

✅ Live Reload

✅ Popup Page

✅ Options Page

✅ Devtools Panel

✅ Background Script

✅ Content Script

✅ E2E testing

✅ CI/CD

🚀 Getting Started

  1. Install dependencies
yarn install
  1. Run development live reload
yarn start:dev
  1. Open Chrome browser
  2. Go to this url: chrome://extensions
  3. Click on "Developer mode"
  4. Click on "Load unpacked"
  5. Choose the extension directory from this root directory
  6. Yay, you did it! 😏
  7. Now update the code as you want! 😛

ℹ️ More info about developing Chrome extension can be found here

🏗 Project Structure

So the purpose is to take the advantage of the type system of TypeScript and to use the power of Nx workspace to create multiple applications with the powerful framework Angular!

So we have 6 components:

  1. Metadata (components/metadata) - manifest and static assets for extensions
  2. Popup (components/popup) - used for the upper popup
  3. Options (components/options) - used for the options page
  4. DevTools Panel (components/devtools-panel) - used for the devtools panel
  5. Background Script (components/background-script) - used for run background job readmore
  6. Content Script (components/content-script) - script run in the context of web pages readmore

In every Chrome extension we have background script that communicate with the content scripts, which can be found in components/background-script/src/main.ts.

We are also can inject content script which can be found in components/content-script/src/main.ts.

All the applications have already the Chrome types so can just use chrome and the editor will recognize it.

🕹 Commands

Start with development configuration

yarn start:dev

Start with production configuration.

yarn start:prod

Build with development configuration.

yarn build:dev

Build with production configuration.

yarn build:prod

Run unit test

yarn test:unit

Run test e2e

yarn test:e2e

Run test on ci

yarn test:ci

📜 License

MIT

About

Chrome extension with angular boilerplate

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published