bbPress is forum software with a twist from the creators of WordPress. Easily setup discussion forums inside your WordPress.org powered site.
Have you ever been frustrated with forum or bulletin board software that was slow, bloated and always got your server hacked? bbPress is focused on ease of integration, ease of use, web standards, and speed.
We're keeping things as small and light as possible while still allowing for great add-on features through WordPress's extensive plugin system. What does all that mean? bbPress is lean, mean, and ready to take on any job you throw at it.
As part of bbPress 2.6 we have revamped our development workflow to streamline and automate many of the tasks that come up day-to-day.
- Validate and test i18n support and generating pot files for easy translation into other languages
- Generate RTL CSS for our international locales that use right-to-left text such as Arabic and Hebrew
- Compile bbPress' admin themes SCSS into CSS
- Minimize CSS, RTL CSS and JavaScript files
- Validating our JavaScript files for errors and coding best practices
- PHPUnit testing framework for PHP integrated with Travis-CI
The /src
directory is the bbPress core source. All of the existing bbPress core files have been moved into this directory. You’ll develop and test against this directory as usual, but the real power will come from using the rest of the tools in the repository. The contents are optimized for development, not production (this means uncompressed CSS and JavaScript files and uncompiled SCSS files).
The /tests
directory is where our PHPUnit tests are stored and makes testing a cinch, it also allows us to commit patches that include changes to both the source and the tests in a single commit.
The /
direcory includes configuration files for our build tools, Travis CI and PHPUnit tests.
Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications.
Any of the following options will get Node.js installed for you:
- Visit Node.js and click on the install link to download Node.js
- If your a Mac user and have Homebrew installed
brew install node
- If your a Windows user and have Scoop installed
scoop install nodejs
Grunt is a JavaScript task runner to automate the tasks outlined above.
First we need to install Grunt's command line interface (CLI).
- Open a command shell terminal *You may need to use sudo (for OSX, nix, BSD etc) or run your command shell as Administrator (for Windows)
- Type the following into your command shell
npm install -g grunt-cli
You can use SVN or Git to contribute to bbPress, the choice is yours. so first you need to get a copy of our source
- Installing SVN on a Mac
- Installing TortoiseSVN on Windows
- Installing GitHub for Mac
- Installing GitHub for Windows
Once you've made that choice checkout of clone our repo If you’re fixing a bug, start by checking out bbPress' repository on your computer.
svn checkout http://bbpress.svn.wordpress.org/trunk
git clone git://bbpress.git.wordpress.org/
git clone https://github.com/bbpress/bbPress.git
Note: Our GitHub mirror repo is not setup at this stage, soon, just not yet. See Meta #637
NPM is included with Node.js and to install the dependancies we need
- Open up your terminal/command shell, you no longer need use sudu/admin
- Change to the directory where you checked out the source eg.
cd ~/dev/bbpress
- Type the following into your command shell
npm install
- Open up your terminal/command shell, again, you no longer need use sudu/admin
- Change to the directory where you checked out the source eg.
cd ~/dev/bbpress
- Type the following into your command shell
grunt
The default task grunt
or grunt build
runs the following tasks in order:
clean:all
- Cleans and deletes the entire/build
foldercopy:files
- Copies all the required files to the/build
foldercolors
- Compiles our admin themes SCSS and copies the compile CSS to the/build
foldercssjanus:core
- Compiles the default CSS to RTL CSS in the/build
foldercssmin:ltr
- Minimizes the default LTR CSS in the/build
foldercssmin:rtl
- Minimizes the RTL CSS in the/build
folderuglify:core
- Minimizes the JavaScript files in the/build
folderjsvalidate:build
- Validates the JavaScript files for errors and coding best practicesmakepot
- Generates thebbpress.pot
file for translators
The build release task grunt build-release
tasks prepares everything we need to release a new version of bbPress on WordPress.org. Again the following tasks are run in order:
clean:all
- Cleans and deletes the entire/build
foldercopy:files
- Copies all the required files to the/build
foldercolors
- Compiles our admin themes SCSS and copies the compile CSS to the/build
foldercssjanus:core
- Compiles the default CSS to RTL CSS in the/build
foldercssmin:ltr
- Minimizes the default LTR CSS in the/build
foldercssmin:rtl
- Minimizes the RTL CSS in the/build
folderuglify:core
- Minimizes the JavaScript files in the/build
folderjsvalidate:build
- Validates the JavaScript files for errors and coding best practiceschecktextdomain
- Validates all of bbPress i18n text domains for internationalizationmakepot
- Generates thebbpress.pot
file for translatorsphpunit
- Runs the PHPUnit tests for single site and multisite WordPress installs
grunt phpunit
- Runs PHPUnit tests, including the ajax and multisite tests.grunt jstest
- Runs both our javascript tasksgrunt jsvalidate
andgrunt jshint
grunt colors
- Compiles our admin themes SCSS and copies the compile CSS to the/build
folder
grunt patch
- List, download and patch bbPress like a boss eg.grunt patch:2452
grunt watch
orgrunt watch:all
Watches for file changes in the/src
directory and automatically copy the updated file to the/build
directory with any minification or RTL tasks included if nessecsary
- WordPress Core Handbook - Working with Patches
- WordPress Core Handbook - Working with Patches
- WordPress Core Handbook - Working with Patches
- WordPress Core Handbook - Working with Patches
- WordPress Core Blog - Git mirrors - Creating a patch with Git
For best practices please refer to the information in the WordPress.org codex. You’ll find more information about PHP, HTML, CSS and JavaScript coding standards there.