Docs for Health WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA
Wordpress custom block plugin for Docs for Health
★ 0stars
1.2krelease downloads
≈10active sites
0.1.12latest · 4 years ago
Install
Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/docsforhealth/dfh-wordpress-plugin/releases/download/0.1.12/dfh-wordpress-plugin-0.1.12.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
Docs for Health WordPress Plugin
Commands
- Initial installation
- Set up the base styles submodule mounted at
src/scss/basewithgit submodule update --init --recursive - Install
package.jsondependencies withyarn install
- Set up the base styles submodule mounted at
- During development:
yarn start- Will also run accompanying tests with name
*.test.jsas needed on file changes - See Jest docs for testing documentation
- Will also run accompanying tests with name
Key files
| File | Description |
|---|---|
dfh-wordpress-plugin.php |
Contains plugin header, defines project-wide constants, and calls src/php/class/Setup.php |
src/editor.js |
Definitions for editor components and other aspects of editor functionality, imported by the src/php/setup/setup_plugin_deps.php setup class after being built by Webpack to the build directory |
src/editor.scss |
Styling that is applied to the editor environment, imports frontend styles to apply to the editor via src/scss/_common.scss |
src/frontend.js |
JS functionality that should be available in the public-facing website |
src/frontend.scss |
Styling that is applied to the public-facing website |
Tips
prettier-plugin-organize-importsenforces consistent imports within JS files and requires thetypescriptdependencyprop-typeschecking only works for native React components, not WP blocks defined viaregisterBlockType- Note that
SCRIPT_DEBUGinwp-config.phpneeds to be set totruein order for non-production script assets to be loaded. - PropType checks only happen in React development builds, not in production builds
- Note that
- Use
git pull && git submodule foreach git pull origin masterto pull remote changes for the current repo and all submodulesyarn git:pullavailable for convenience
Deploying
- Update the
Versionfield in the masthead ofdfh-wordpress-plugin.phpto your desired release version - For completeness, also update the
versionfield inpackage.jsonto the same version you entered in the prior step - Commit changes with
git commit -am <message here> - Create an annotated tag to mark the release with
git tag -a <tag version> -m <release message>. By convention, the tag version is the same as the release version specified earlier. Note that we use annotated tags instead of lightweight tags as these are intended for release. - Push new commit to remote origin with
git push - Push new tag to remote origin with
git push --tags. Travis CI will detect the new tag and launch into the build and release process as specified in.travis.yml
Tips
- Changes to deployment configuration in
.travis.ymlcan be validated using online checker - If deployment fails because authorization fails, may need to regenerate personal access token and update the Travis CI environment variables with this new value. Note that deployments are authenticated using the dedicated deployment account
@ericbaibot
Releases
Newest 25 of 37 recorded releases. Each count is every asset in that release; expand a row for the breakdown.
Active-site estimate ≈10 comes from the median of recent superseded releases. Method.