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

generator-naymspace-wp-plugin

v0.0.4

Published

A Yeoman generator for non-bloated, easily maintainable wordpress plugins

Downloads

5

Readme

generator-naymspace-wp-plugin

A Yeoman generator that aims to make plugin development of any kind a breeze.

This is an alpha release. Nevertheless it will create an extremely opinionated plugin-structure for you. We believe that this is an excellent approach to wp-plugin-development and hope for contributions!

As we will be creating more plugins for our customers in the future, we will add and extend new modules every now and then. We will try to actively promote the development of this plugin.

Getting Started

yo naymspace-wp-plugin

Why should i use this?

This opinionated plugin-boilerplate has been written for ourselves, for developers. Therefore it's built to be easily understandable, maintainable and extendable. It will not just setup plugin meta-data, but structure your whole plugin and provide usefull modules which will guide you and make you encourage best practives.

After the generator has done it's work, the plugin will be recognized by wordpress' plugin manager and you can immediately start developing.

Yeoman did all his fancy magic, what now?

Now you will have to get your hands dirty and alter the index.php and the modules you want to use.

index.php

Please have a look at wordpress' codex, which explains how to setup a plugins metadata. This is where your plugin's options, that you want to be configured via the Backend, go as well. You can add them to your plugin's Base::$options hash (in index.php):

'someOption' => array(
    'id'    => '<%= namespace %>-someOption',
    'title' => 'Some description for the admins',
    'type'  => '[checkbox|text]'
),

You can retrieve the current value of your option in (almost) any place in your plugin via:

Helper::get_option('someOption');

Aside from that, you only have to care about which modules are loaded in the constructor.

Modules

The goal of this project is to have separate modules for separate concerns. This way no unneccessary code has to be loaded. For now there are:

The Helper

It's loaded automatically and contains some static methods to make your life easier. You should have a look!

Frontend

Shows you how to load scripts and styles!

Backend

Creates an options page in the backend, which renders all the options you specified in the plugin's index.php.

Database

This is just a stub. Please contribute!

Goals of this project

  • Make the wordpress plugin ecosystem a better place. No more 3000-lines-of-code-files!
  • Be be sparing with resources: load and process things only when they are really needed to.
  • Keep code maintain- and extendable via modules.
  • Encourage best pratices.

TODO

  • Add more modules (AJAX)
  • Add more functionality to the database-module

License

MIT