Drag & Drop WordPress Responsive Form Builder
Requires: git, npm, Grunt.
- Clone repo to plugin directory
git clone git@github.com:CalderaWP/Caldera-Forms.git
- Switch directory
cd Caldera-Forms.git
- npm install
npm i
To create a build to ship to WordPress.org:
npm run package
This creates /build/<version>
where <version>
is the current version set in package.json
. This creates a directory you can ZIP up for testing or whatever.
See "Release To WordPress.org" section below for more details on pushing this build to WordPress.org.
Run watcher for development to auto-compile JavaScript and CSS.
This is the new stuff, built with webpack. Eventually everything UI will be here.
-
Clients:
- pro - The Caldera Forms Pro admin page and tab in the editor.
- blocks - The Gutenberg block(s).
- admin - The main admin page. Work in progress, not used in plugin.
- viewer - The entry viewer. Work not in progress, not used in plugin.
- editor - Theoretical.
-
Build for development and start watcher.
npm run dev
-
Build for production
npm run build:webpack
This is the old stuff, built with grunt.
- Build for development and start watcher.
npm run dev:grunt
- Build for production
npm run build:grunt
All PHP tests are based off of the WordPress "unit" test suite, and therefore need a full WordPress test environment. The install script in '/bin' is pretty standard and should work with VVV or whatever.
We provide a docker-based development environment. It is recommended that you use this environment because the setup is scripted and all of the tests can be run with it.
The local server is http://localhost:8228
- Docker
- Composer
- npm
- PHP tests go in /tests and are run using phpunit
- Integration tests, which require WordPress, are in tests. These used to be all the tests we have.
- Unit tests -- isolated tests that do NOT require WordPress -- go in
tests/Unit
. - The trait
calderawp\calderaforms\Util\Traits
should have all of the factories used for integration and unit tests (aspirational.)
- JavaScript UNIT tests go in clients/tests
- Unit tests go in clients/tests/unit and are run using Jest
- Unit tests must have the word test in file name. For example,
formConfig.test.js
- End to end tests go in
cypress/integration
amd are written using Cypress- See our [Cypress README for testing}(./cypress/README.md)
composer wp:install
- Installs Docker-based test environment.composer wp:start
- Starts Docker-based test environment.composer wp:activate
- Activate plugins in Docker-based environment.composer wp:tests
- Runs the PHP integration tests using phpunit inside Docker-based environment .composer wp:stop
- Stops Docker-based test environment, without destroying containers.composer wp:destroy
- Removes (including the database) the test environment and destroys containers.npm test
- Run JavaScript test watchernpm run test:once
- Run JavaScript unit tests once
- svn
- npm
- Grunt
npm install -g grunt-cli
- Have commit access to Caldera Forms svn
- Build release file
npm package
- Push Tag to WordPress.org
cd bin
bash deploy-wp-org-tag.sh 12345 christiechirinos
- Install tag using WP Rollback on QA site and re-run Ghost Inspector tests.
- Copy tag to trunk
bash deploy-wp-org-trunk.sh 12345 christiechirinos
- This assumes your WordPress.org username is
christiechirinos
, and your password is12345
. - The first argument is password, which is required. The second argument is username, which defaults to
Shelob9
, which is Josh's username.
- The default branch is "master" that should be the same as WordPress.org.
- Development happens on the "develop" branch. There may be an exception, see: https://github.com/CalderaWP/Caldera-Forms/blob/master/CONTRIBUTING.md#current-git-workflow--php-compatibility
- If you find a bug, or would like to make a feature request, please open an issue.
- If you fixed a bug, or made a new feature, please submit a pull request against the develop branch.
- The default branch is "master" that should be the same as WordPress.org.
- Development happens on the "develop" branch.
- If you find a bug, or would like to make a feature request, please open an issue.
- If you fixed a bug, or made a new feature, please submit a pull request against the develop branch.