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-wp-make

v0.4.7

Published

Yeoman generator

Downloads

35

Readme

WP-Make

WP-Make is a Yeoman generator for quickly creating new WordPress projects based on some established template designs currently used by 10up.

Briefly, WP-Make can be used to create a new theme, child theme, plugin, or library project - complete with unit tests - in seconds!

Getting Started

If you need it, install Yeoman through npm:

$ npm install -g yo

To install generator-wp-make clone this repository, enter the directory, and link it to npm:

$ git clone [email protected]:10up/generator-wp-make.git && cd generator-wp-make
$ npm link

Finally, in the desired project directory, initiate the generator:

$ yo wp-make

Project Types

WP-Make ships with four default project types, each invoked with a subgenerator.

For each project type you get:

  • Composer to manage server-side dependencies
  • Bower to manage front-end dependencies
  • NPM to manage development dependencies (like Grunt)
  • Grunt to streamline development
  • phpunit, paratest, and WP_Mock for PHP unit testing
  • Mocha and Chai for JS unit testing
  • A fully-fleshed out, namespaced setup for WordPress plugin development

Plugin

This subgenerator scaffolds out a standard WordPress plugin.

The project even includes some basic unit test examples to help get you started!

Theme

This subgenerator scaffolds out a standard WordPress theme.

The project even includes some basic unit test examples to help get you started!

Child Theme

This subgenerator scaffolds out a standard WordPress child theme.

The project even includes some basic unit test examples to help get you started!

Library

This subgenerator scaffolds out a WordPress library. Libraries are a bit different from plugins in that they're meant to be included via Composer and embedded directly into a theme or a plugin.

Profiles

All four sub-generators support the use of a .wpmakerc file for defining project defaults. This file should be placed in your system's home directory (~/ on *nix systems, C:\Users\{username} on Windows). The file follows a standard INI format and should look like the following:

; You can define a default profile to use if no other is specified
default = Basic

[Basic]
  ; Define the license to be used for the project (use SPDX formats)
  license        = MIT
  ; Define the standard root namespace for PHP files, otherwise `\TenUp` will be used
  root_namespace = EricMann
  ; Define the minimum versions of PHP/WordPress required, as well as the highest WP version tested
  php_min        = 7.0
  wp_tested      = 4.5
  wp_min         = 4.5
  ; Override standard author information, otherwise the current Git user will be used
  authorName     = Eric Mann
  authorEmail    = [email protected]
  authorUrl      = https://eamann.com
  ; Set a standard project homepage - this will be used as the prompt default
  projectHome    = https://ttmm.io
  
[Enterprise]
  ; If no license is required, pass `false` for both licensing fields to omit them from all output
  license        = false
  licenseuri     = false
  ; Specify the string `prompt` for fields that need to be prompted at runtime
  root_namespace = prompt
  php_min        = 5.3
  wp_tested      = 4.4.2
  wp_min         = 4.2.0
  authorName     = My Agency
  authorEmail    = [email protected]
  authorUrl      = https://myagency.org
  projectHome    = https://myagency.org/projects

If no profile is specified at runtime, the profile listed as default will be used. However you specify a non-default profile with the --profile flag at the command line:

$ yo wp-make:plugin --profile Enterprise

Some fields will always prompt - the profile will merely set the default:

  • projectHome

Some fields will prompt only when a default is NOT set in a profile:

  • root_namespace

Some fields will never prompt but will use either the profile or a hard-coded default:

  • license
  • licenseuri
  • php_min
  • wp_tested
  • wp_min

License

MIT