GithubHelp home page GithubHelp logo

pressbooks / pb-cli Goto Github PK

View Code? Open in Web Editor NEW
4.0 11.0 1.0 624 KB

A suite of wp-cli commands for Pressbooks.

Home Page: https://cli.pressbooks.org/

License: GNU General Public License v3.0

PHP 60.04% Gherkin 9.29% JavaScript 1.21% Stylus 0.34% SCSS 11.82% Mustache 17.29%

pb-cli's Introduction

pressbooks/pb-cli

A suite of wp-cli commands for Pressbooks.

Build Status

Quick links: Using | Installing | Contributing | Support

Using

This package implements the following commands:

wp scaffold book-theme

Generate the files needed for a Pressbooks book theme.

wp scaffold book-theme <slug> <vendor> [--theme_name=<title>] [--description=<description>] [--uri=<uri>] [--author=<author>] [--author_uri=<author_uri>] [--github_account=<github_account>] [--github_repo=<github_repo>] [--license=<license>] [--textdomain=<textdomain>] [--version=<version>] [--dir=<dir>] [--activate] [--enable-network] [--force]

Default behavior is to create the following files:

  • functions.php
  • .gitignore, .editorconfig, package.json, composer.json, composer.lock, yarn.lock
  • README.md

Unless specified with --dir=<dir>, the theme is placed in the themes directory.

OPTIONS

<slug>
	Slug for the new theme.

<vendor>
	Vendor for the new theme. Used in composer.json and package.json.

[--theme_name=<title>]
	What to put in the 'Theme Name:' header in 'style.css'. Defaults to <slug>.

[--description=<description>]
	Human-readable description for the theme.

[--uri=<uri>]
	What to put in the 'Theme URI:' header in 'style.css'.

[--author=<author>]
	What to put in the 'Author:' header in 'style.css'.

[--author_uri=<author_uri>]
	What to put in the 'Author URI:' header in 'style.css'.

[--github_account=<github_account>]
	The GitHub account that owns this project (e.g. 'pressbooks'). Defaults to vendor.

[--github_repo=<github_repo>]
	The GitHub repo name for this project (e.g. 'pressbooks-book'). Defaults to slug.

[--license=<license>]
	What to put in the 'License:' header in 'style.css'.
	---
	default: GPL 2.0+
	---

[--textdomain=<textdomain>]
	Text domain for the theme. Defaults to <slug>.

[--version=<version>]
	Version for the theme.
	---
	default: 1.0
	---

[--dir=<dir>]
	Specify a destination directory for the command. Defaults to the themes directory.

[--activate]
	Activate the newly created book theme.

[--enable-network]
	Enable the newly created book theme for the entire network.

[--force]
	Overwrite files that already exist.

wp pb issue-template

Generate an issue template for a Pressbooks theme or plugin, placing it in .github/ISSUE_TEMPLATE.md.

wp pb issue-template <slug> --type=<type> --owner=<owner> [--dir=<dir>] [--force]

OPTIONS

<slug>
	Slug for the theme or plugin (e.g. pressbooks, pressbooks-book).

--type=<type>
	The type of repo for which we're generating an issue template. Must be `theme` or `plugin`.

--owner=<owner>
	The GitHub username of this repo's owner (e.g. pressbooks).

[--dir=<dir>]
	Specify a destination directory for the command. Defaults to the theme or plugin's directory.

[--force]
	Overwrite files that already exist.

wp pb theme lock

Lock a book's theme.

wp pb theme lock --url=<url>

OPTIONS

--url=<url>
	The URL of the target book.

wp pb theme unlock

Unlock a book's theme.

wp pb theme unlock --url=<url>

OPTIONS

--url=<url>
	The URL of the target book.

wp pb clone

Clone a book.

wp pb clone <source> <destination> --user=<user>

OPTIONS

<source>
	URL

<destination>
	Book slug on the current network

--user=<user>
	sets request to a specific WordPress user

Installing

Installing this package requires WP-CLI v2.5.0 or greater. Update to the latest stable release with wp cli update.

Once you've done so, you can install this package with:

wp package install [email protected]:pressbooks/pb-cli.git

Upgrade Notice

2.1.0

  • PB-CLI requires Pressbooks >= 5.21.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.