Skip to content
This repository has been archived by the owner on Mar 14, 2020. It is now read-only.

Releases: 10up/generator-wp-make

Prompt for Root PHP Namespace Unless a Default Is Set

27 May 18:15
Compare
Choose a tag to compare

In agency work it's extremely important that employees understand who owns the code they are writing. Previously, the root PHP namespace defaulted to TenUp. This was confusing since internally 10up may be writing that code for a client. Externally, TenUp makes sense for no one. As such, the root namespace will prompt unless a default is set in a profile.

Bracket Fixes

05 May 01:17
Compare
Choose a tag to compare

Some bracket errors were introduced with 0.4.0 causing generation failure and grunt task errors. This fixes those currently know issues.

0.4 Profile Support

11 Apr 23:14
Compare
Choose a tag to compare

Profile Support

Our newest release introduces the concept of profiles for initial project configuration. Rather than specifying all of the settings supported by the Yeoman generator at runtime, certain properties can be specified in a default INI file in your user directory.

The items that can be pre-configured include:

  • projectHome - The home directory for a project. This will still trigger a prompt, but will set the default value.
  • root_namespace - The base namespace to use in PHP files. If set to the string "prompt," this will trigger a prompt instead. Otherwise, the root namespace will always default to TenUp.
  • license - Accepts any SPDX license string and will not ever prompt the user.
  • licenseuri - Set the remote path to a license file or readme. Will not ever prompt.
  • php_min - The minimum version of PHP required for the project (used by composer.json). Will not ever prompt.
  • wp_tested - The maximum version of WordPress with which the project has been tested. Will not ever prompt.
  • wp_min - The minimum version of WordPress required. Will not ever prompt.

These values should be stored in an INI-style file named .wpmakerc in your home directory (~/.wpmakerc on Linux or Mac, C:\Users\{Your Username}\.wpmakerc on Windows). Please see the README for details on the file layout and instructions on specifying a default profile.

Other Changes

In addition, v0.4 brings in several other improvements, enhancements, and bugfixes:

  • Switch from qUnit to Mocha/Chai for JavaScript unit testing
  • Late escape the strings used for humans.txt inclusion (for better automated code sniffing)
  • Introduces WordPress' default .editorconfig for generated projects
  • Patches a bug with special characters in PHP namespaces
  • Refactors the use of $debug flags for script/style includes for consistency

Credits

Credit for this release is due to the entire list of contributors to WP Make, but the changes above are due directly to the efforts of:

Thanks goes out not just for contributing code changes, but for proactively testing and reporting issues with the generator and the code it creates. Keep up the great work!