Set of generators to speed things a bit for some repetitive tasks.
npm install -g generator-moxie-leannpm update -g generator-moxie-lean- new-wp: Generates a new WordPress project.
- new-wp-project: Generates the config for a new WordPress project and initialises Git.
- new-wp-plugin: Generates a new WordPress plugin.
- php-lib: Command to generate files from a PHP library with files like: composer, codesniffer and others.
This is the main command.
This generator creates a new WordPress project, including root level config and Lean plugin.
Command
yo moxie-lean:new-wpIt will prompt you for:
- The project name
- github/bitbucket repo uri. (optional)
Note: that the plugin will take the same name as the project. You should use a lowercase name separated with -'s.
Generates the config files required for a WordPress project.
Command
yo moxie-lean:new-wp-projectYou need to set-up the remote repo first on GitHub or Bitbucket.
This generator creates:
composer.jsonfile- Default
.gitignorefile .travis.ymlfile to set up CI.
It then initialises Git and pushes to your remote repo.
It will prompt you for the project name and github/bitbucket repo uri. Alternatively you can pass the name as a CLI argument:
yo moxie-lean:new-wp-project --name my-plugin-nameGenerates a new WordPress plugin.
To run this command just type on the terminal:
yo moxie-lean:new-wp-pluginThis generator creates a new plugin and updates the namespace and constant names.
It will prompt you for the plugin name, which defaults to the folder name. Alternatively you can pass the name as a CLI argument:
yo moxie-lean:new-wp-plugin --name my-plugin-nameCommand
yo moxie-lean:php-libThis generator is useful to create a new PHP libs with the same files used across other PHP libraries,
that uses composer as the package manager, and set a CI (continus
integration) system to used with travis in order to follow the WordPress
Code Standard as much as possible.
This generator creates:
- A
composer.jsonfile - A set of rules used for the codesniffer with some exceptions to allow
PSR4and namespaces. - A default
.gitignorefile - An
.editorconfigfile - A
.travis.ymlfile to set up CI. - A
MITlicence file