# wp scaffold

Aide:

```bash
$ wp help scaffold
```

```bash
NAME

  wp scaffold

DESCRIPTION

  Generates code for post types, taxonomies, plugins, child themes, etc.

SYNOPSIS

  wp scaffold <command>

SUBCOMMANDS

  _s                Generates starter code for a theme based on _s.
  block             Generates PHP, JS and CSS code for registering a Gutenberg block for a plugin or theme.
  child-theme       Generates child theme based on an existing theme.
  plugin            Generates starter code for a plugin.
  plugin-tests      Generates files needed for running PHPUnit tests in a plugin.
  post-type         Generates PHP code for registering a custom post type.
  taxonomy          Generates PHP code for registering a custom taxonomy.
  theme-tests       Generates files needed for running PHPUnit tests in a theme.
```

Create your [underscores](https://underscores.me) based theme:

```bash
$ wp scaffold _s myNewTheme
Success: Created theme 'MyNewTheme'
```

Créer un child-theme:  

```bash
$ wp scaffold child-theme tw17-clone --parent_theme=twentyseventeen --theme_name="TW17 Clone"
Success: Created '/Users/bruno/Sites/wordpress/wp-content/themes/tw17-clone'.
```

```bash
$ wp scaffold child-theme tw17-clone --parent_theme=twentyseventeen --theme_name="TW17 Clone" --author=FULL-NAME --author_uri=URI --theme_uri=URI --activate --force
Success: Created '/Users/bruno/Sites/wordpress/wp-content/themes/tw17-clone'.
```

Créer un nouveau plugin avec unit tests

```bash
$ wp scaffold plugin sample-plugin
Success: Created plugin files.
Success: Created test files.
```

Créer un nouveau plugin sans unit tests

```bash
$ wp scaffold plugin sample-plugin --skip-tests
Success: Created plugin files.
```

