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

iitcpluginkit

v1.9.3

Published

IITC-Plugin Kit ============ Addon developing framework for IITC - Ingress Intel Total Conversation.

Downloads

87

Readme

IITC-Plugin Kit

Addon developing framework for IITC - Ingress Intel Total Conversation.

If you don't know IITC or the game Ingress you're on the wrong website. See www.ingress.com, iitc.app or iitc.me

With this framework you can ...

  • use Typescript for addon developing
  • create a new plugin with a single command
  • split your code into multiple files
  • directly include images or css files
  • debug your code inside the browser
  • ...

Required software

Tutorial

see: https://github.com/McBen/IITCPluginKit_Example/wiki

Starting a new plugin

In a new directory run:

yarn add iitcpluginkit

to install this framework.

yarn ipk

will help you creating all configuration files and the main plugin file.

At this point you already have a working plugin. You only have to fill in your new ideas.

Build & Install your plugin

The short way: yarn autobuild

This will build your plugin and start a local file server you can use to install it. Additional it will watch for files changes and rebuild your plugin if required. So while autobuild is running open localhost:8100 and install or update your plugin.

If you prefer the manual way: run yarn build to build your plugin inside the /dist/ folder.

see Yarn Tool commands

Note: if you need to change the port 8100 add " -p 8101" to the commands "start" and "autobuild" in you package.json.

Coding

At this point yarn ipk should already had created your plugin main file. Default: /src/Main.ts. That's were you start coding. init() will be called on plugin start. This is you entry point.

Most of the common used IITC functions should be already availible. If you're not sure what you need or what function IITC provides you could look at ./nodes_modules/iitcpluginkit/src/types/iitc or take a look at the real iitc-code.

A coding tutorial will be available soon.

Yarn Tool commands

| Command | Description | | --- | --- | | yarn build | alias for yarn build:dev | | yarn build:dev | developer build | | yarn build:prod | production build | | yarn start | runs a fileserver for the 'out'-directory | | yarn autobuild | auto rebuild on filechange & running the fileserver |

Developer vs Production build

The production code will strip of sourcemaps and have some minor optimation.
If you set minimize: true (in your plugin.config) it will minimize resulting code and remove console.log commands. By default this option is off to allow 3rd-party developers to review your code at runtime.

The version number will not contain the build-date in production code. So you should make sure the correct version number is set by setting a git-tag or changing the version number in your plugin.json.

Advanced topics

Images:

in css:

.mydiv { background:url("image.png"); }

(svg is currently not supported in CSS!)

in ts:

  import myimage from "myimage.svg";

  const myIcon = L.icon({iconUrl: myimage});

CSS / Postcss

CSS-Examples:

@import 'buttons'; /* include another css file (postcss-import) */

$IITC_YELOW: #ffce00; /* create variables (postcss-simple-vars) */

.myblock {
    .anotherblock {  /* nested css (postcss-nested) */
        color: $IITC_YELOW;
        background-color: color(red shade(20%)) /* color manipulation (postcss-color-function) */
    }
}

Webpack

You can tweak or enhance used webpack config by creating a custom config.js in you project root directory. webpack.config.js

module.exports =  {
    output: {
        filename: "megaplugin.user.js"
    }
};

or as function: module.exports = function (config) { config.output.filename="megaplugin.user.js"; }

plugin.json

Is generated by the ipk script on init and contains the script metablock data.

Additional options are: "entry": filename of main file "banner": string on top of the file "changelog": filename of the changelog. it will be included after the metablock "icon": string (or uri) to a 64x64 icon or empty to suppress the default one