Skip to content

Instantly share code, notes, and snippets.

@franz-josef-kaiser
Last active August 29, 2015 14:07
Show Gist options
  • Save franz-josef-kaiser/959f3d5a9cf65fb42e4d to your computer and use it in GitHub Desktop.
Save franz-josef-kaiser/959f3d5a9cf65fb42e4d to your computer and use it in GitHub Desktop.
WordPress Composer.json standard keys

For every bit of configuration that we might need in Composer scripts or packages, we can add extra data.

{
    "extra" : {
      "wordpress-install-dir" : "",
		  "wordpress-env-dir"     : "",
		  "bash-profile-dir"      : ""
    }
}

The problem: The more packages we have, the more messy it gets. We should set a standard as soon as possible.

Summon everything WordPress related:

{
    "extra" : {
      "wordpress" : {
        "install-dir" : "",
		    "env-dir"     : "",
		    "bash-dir"    : ""
	    }
    }
}

What names should pathes have? Should we mirror the wp-config.php constants? Underscore to Dash tranformation and all lower case characters? Example: WP_CONTENT_DIR becomes wp-content-dir, WP_DEBUG becomes wp-debug etc.

Please add your suggestions as comments or forks. I will keep this file updated with your additions.

@franz-josef-kaiser
Copy link
Author

@tarendai What I tried to say is exactly that: WP_CONTENT_DIR becomes wp-content-dir (Dash and lower case transformation). English still isn't my first language :P

Maybe it would be even better if we have a rule that removes the use of wordpress and wp as it's already clear that this is the topic. So WP_CONTENT_DIR would become just content-dir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment