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

@kleenebok/create-chrome-extension

v0.9.5

Published

Zero configuration environment for developing Chrome extensions with all new features like Webpack, Babel, React and almost everything you want.

Downloads

1

Readme

Create Chrome Extension

Bootstrap project for developing any kind Chrome extensions with all javascript features like NPM packages, Webpack, Babel, React and almost everything you want.

WARNING

This is proof new version inspired by Create React App. It is not fully working, but you can follow it and help to make it better. It is still in state of transition from Webpack Chrome Extension and not everything is in README or work on 100%.

Turn this

manifest.json

{
  "content_scripts": [{
    "js": ["jquery.min.js", "jquery-spellchecker.min.js", "jquery-megamask.min.js", "jquery-scrolltie.min.js", "my-plugins.js", "app.js"],
    "css": ["app.css"]
  }]
}

Into this

manifest.json

{
  "content_scripts": [{
    "js": ["app.js"]
  }]
}

Run npm install jquery jquery-spellchecker jquery-megamask jquery-scrolltie --save

app.js

import 'jquery'
import 'jquery-spellchecker'
import 'jquery-megamask'
import 'jquery-scrolltie'
import './my-plugins'

import "./app.css"

// Here start my application
$('input').spellchecker()

Environment support

Extension features support

Installation

In your project npm install -D chrome-extension-scripts

Run development environment

You should do this before editing any code to see how it works.

  1. run chrome-extension run [path to manifest.json] -o [path to build directory]
  2. in Chrome open chrome://extensions/
  3. check Developer mode
  4. click on Load unpacked extension
  5. add your build directory
  6. changing of manifest.json wont trigger hot reloading and you have to rerun step 1.

Build production extension

  1. run chrome-extension build [path to manifest.json] -o [path to release directory]
  2. It will compile scripts, styles and other assets into your release directory
  3. It will make chrome extension into your release directory with certificate

chrome-extension command api

Run chrome-extension run [manifest_path] -o [build_path] -e [environment]

Build chrome-extension build [manifest_path] -o [build_path] -e [environment]

Example

  • in this repo see example/manifest.json for basic usage of background script, content script, action popup and chrome url overrides.
  • all scripts and/or html pages from manifest.json are piped through preprocessor and prepared for using all features.
  • in your scripts you can use npm packages, babel, react (jsx), styles (with preprocessors) and any modern javascript feature you know.
  • when your extension does exactly what you want, you can run make production ready .crx build.

How to run it

  1. clone this repository git clone [email protected]:schovi/webpack-chrome-extension.git
  2. run npm install
  3. run npm run example
  4. to build extension run npm run example:build

Troubleshoting

  1. everything looks fine, but scripts from webpack arent loading.
  • Probably problem with development ssl certificates. Open any script (i.e. https://localhost:3001/path_to_your_script.js) in separate tab and allow chrome to load it anyway. Then reload extension.

Done

  • [x] detect Chrome path for building extension

Future

  • [ ] allow to pass existing .pem when building extension
  • [ ] experiment with hot middleware (hints in NOTE.md)
  • [ ] allow to have "static" files which will be merged into build
  • [ ] allow to reload extension when popup html file changed
  • [ ] solve Hot reload fix better than overriding file in /node_modules. It is really ugly and hacky
  • [ ] test assets without base64
  • [ ] add support for extension updating