tekta

1.2.2 • Public • Published

generator-tekta NPM version

Generates (or regenerates) structure for a WordPress plugin, using the Tekta framework.

Installation

  1. Install Tekta using using npm or yarn (we assume you have already installed node.js).
# npm
npm install -g tekta
# yarn
yarn global add tekta
  1. Generate your new project:
mkdir my-new-plugin
cd my-new-plugin
tekta

Usage

The first time you run tekta in a directory, it will walk you through the plugin scaffolding process, asking you questions, and generating a plugin.

Your answers are written out to a file called tekta.json. Keep this. Check it into your plugin's Git repo. This stores all the information that Tekta knows about your plugin.

If you want to change your answers and re-generate the plugin framework, you can run tekta --ask-answered or you can just edit the tekta.json file and run tekta again.

Note: most files within the app/ diretory will only be generated if they do not exist, so if you do something like change the namespace of your plugin, it will not be updated here. To regenerate those files, you can just delete (or move aside) the app/ directory and re-run tekta.

If a run of tekta is going to edit files (which it will, if Tekta has been updated or if you changed anything in tekta.json), it will prompt you for each change. You can press d to see the diff of changes, and y (or just return) to accept the change. If you want to blindly apply the changes, you can run tekta --force.

Structure

├── LICENSE *            # Your license file.
├── app                  # Your app directory.
│   ├── Plugin.php       # Your main plugin file.
│   ├── functions.php    # A place for namespaced helper functions.
│   └── setup.php        # For things like plugin activation hooks.
├── index.php *          # Your plugin entry file.
├── lib                  # Library files.
│   ├── Tekta *          # Tekta support files.
│   └── Mozart *         # Namespaced Mozart (Composer) packages.
├── load.php *           # Bootstrap file for your plugin.
└── tekta.json           # Tekta configuration.

* = do not edit

Anything marked with a * should never be edited. These files and directories are auto-generated every time you run tekta.

License

MIT © Mark Jaquith

Package Sidebar

Install

npm i tekta

Weekly Downloads

3

Version

1.2.2

License

MIT

Unpacked Size

198 kB

Total Files

52

Last publish

Collaborators

  • markjaquith