豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 2.69 KB

File metadata and controls

53 lines (35 loc) · 2.69 KB

Achievements for WordPress

Achievements gamifies your WordPress site with challenges, badges, and points.

Have you found a bug, or have a feature request? If you have a Github account, please report issues here. Otherwise, send an email to: paul at byotos.com.

If you just want to use Achievements on your WordPress site, it's best to download the plugin from WordPress.org. This Github repository is intended for developers and other people who want to contribute to the project.


Requirements

Install Node.js and the Grunt CLI.

Getting Started

Once you've installed Node.js and the Grunt CLI, you're ready to get started.

  1. Clone this repository in a directory of your choice by running git clone https://github.com/paulgibbs/achievements.git.
  2. Navigate to the directory in your shell.
  3. Run npm install.
  4. In your shell environment, set the ACHIEVEMENTS_DIR variable to the path to your WordPress dev install's plugin folder. Be sure to call the actual plugin directory achievements! For example: export ACHIEVEMENTS_DIR="/Users/paul/Sites/example.com/wp-content/plugins/achievements"
  5. Run grunt rsync:everything to copy the dev version of the plugin into your WordPress folder.

Documentation

The src directory contains the Achievements' plugin core files. You can develop against the src directory like you normally would develop against any other WordPress plugins' SVN trunk.

grunt or grunt build-dev

Generates the development-optimised source in the src directory.

grunt build-prod

Generates the production-optimised source in the build directory.

grunt clean:all

Removes the build directory.

grunt rsync:everything

Copies the src directory to the location specified by the ACHIEVEMENTS_DIR environment variable.

grunt watch:css

Watches for changes to the LESS files; compiles into CSS, and copies into the src directory. Also does a rsync:everything. USE THIS WHEN WORKING ON THE PLUGIN!

grunt watch:sync

Watches for changes to any files in the src directory, and rsyncs to the location specified by the ACHIEVEMENTS_DIR environment variable. USE THIS WHEN WORKING ON THE PLUGIN!