npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@spaceribs/nx-web-ext

v6.0.0

Published

This nx-plugin allows you to build, test and deploy web extensions.

Downloads

146

Readme

nx-web-ext

Supported Versions

| Package Version | Nx Version | Supported | | --------------- | ---------- | ------------------ | | 6.x | 20.x | :white_check_mark: | | 5.x | 19.x | :white_check_mark: | | 4.x | 18.x | :white_check_mark: | | 3.x | 17.x | :white_check_mark: | | 2.x | 16.x | :x: | | 1.x | 15.x | :x: | | 0.x | 14.x | :x: |

This library was generated with Nx.

Quick Start

  1. Add @spaceribs/nx-web-ext to your project:

    $ npm install @spaceribs/nx-web-ext --save-dev
    # or
    $ yarn add @spaceribs/nx-web-ext --dev
  2. Generate a new chrome extension:

    $ nx g @spaceribs/nx-web-ext:application my-extension
    
    >  NX  Generating @spaceribs/nx-web-ext:application
    
    ? What framework would you like to use? …
    angular
    react
  3. Start the chrome extension in development mode:

    $ nx run my-extension:serve
    
    > nx run my-extension:serve:development
    
    Entrypoint main [big] 1.32 MiB (1.53 MiB) = runtime.js 7.05 KiB vendor.js 1.31 MiB main.css 112 bytes main.js 7.53 KiB 4 auxiliary assets
    Entrypoint polyfills [big] 334 KiB (393 KiB) = runtime.js 7.05 KiB polyfills.js 327 KiB 2 auxiliary assets
    Entrypoint styles 7.44 KiB (6.11 KiB) = runtime.js 7.05 KiB styles.css 398 bytes 1 auxiliary asset
    chunk (runtime: runtime) main.css, main.js (main) 3.62 KiB (javascript) 75 bytes (css/mini-extract) [initial] [rendered]
    chunk (runtime: runtime) polyfills.js (polyfills) 296 KiB [initial] [rendered]
    chunk (runtime: runtime) runtime.js (runtime) 3.62 KiB [entry] [rendered]
    chunk (runtime: runtime) styles.css (styles) 50 bytes (javascript) 397 bytes (css/mini-extract) [initial] [rendered]
    chunk (runtime: runtime) vendor.js (vendor) (id hint: vendor) 1.29 MiB [initial] [rendered] split chunk (cache group: vendor) (name: vendor)
    webpack compiled successfully (3c3dfb1485cdd31e)
    Application built successfully.
    Running web extension from /Users/spaceribs/dist/projects/my-extension
    Type-checking in progress...
    No errors found.
    Use --verbose or open Tools > Web Developer > Browser Console to see logging
    Installed /Users/spaceribs/dist/projects/my-extension as a temporary add-on
    The extension will reload if any source file changes
    Press R to reload (and Ctrl-C to quit)
    Debugger Port:  61124
    WebExt started successfully.
  4. In the firefox instance, a simple square box should appear in the toolbar. Clicking this browser action should display a simple popup described as the "action" component.

Build and Package

  1. Bump the version of your extension in the manifest.json.

  2. Package the extension:

    $ nx run my-extension:package
    
    > nx run my-extension:build:production
    
    Entrypoint main 154 KiB = runtime.6877ee6c392522fa.js 1.79 KiB main.ef46db3751d8e999.css 0 bytes main.2368e728f2ffe87b.js 153 KiB
    Entrypoint polyfills 92.7 KiB = runtime.6877ee6c392522fa.js 1.79 KiB polyfills.5ede5f07b79c9d6c.js 90.9 KiB
    Entrypoint styles 1.79 KiB = runtime.6877ee6c392522fa.js 1.79 KiB styles.ef46db3751d8e999.css 0 bytes
    chunk (runtime: runtime) main.ef46db3751d8e999.css, main.2368e728f2ffe87b.js (main) 319 KiB (javascript) 0 bytes (css/mini-extract) [initial] [rendered]
    chunk (runtime: runtime) polyfills.5ede5f07b79c9d6c.js (polyfills) 296 KiB [initial] [rendered]
    chunk (runtime: runtime) styles.ef46db3751d8e999.css (styles) 50 bytes (javascript) 0 bytes (css/mini-extract) [initial] [rendered]
    chunk (runtime: runtime) runtime.6877ee6c392522fa.js (runtime) 4.61 KiB [entry] [rendered]
    webpack compiled successfully (b6bd8837991fc2fa)
    
    > nx run my-extension:package
    
    Building web extension from dist/projects/my-extension
    Your web extension is ready: /Users/spaceribs/dist/projects/my-extension-0.0.1.zip
  3. Upload the extension to either the Mozilla Developer Hub and/or Chrome Web Store.