Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup improvements #98

Draft
wants to merge 4 commits into
base: trunk
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ WordPress.org-specific customizations for the Two Factor plugin
}
add_action( 'init', __NAMESPACE__ . '\add_rewrite_rules' );
```
1. Install, build, and activate the `wporg-support` theme.
1. Install, build, and activate the [wporg-support](https://meta.svn.wordpress.org/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/) theme.
1. Install `bbPress` and `Gutenberg`. You might need to clone & build `trunk` branch of `Gutenberg` if we happen to be using any new features.
1. `git clone` https://github.com/WordPress/two-factor/ into `wp-content/plugins` and follow their setup instructions.
1. `git clone` this repo into `wp-content/plugins`
Expand All @@ -53,7 +53,7 @@ WordPress.org-specific customizations for the Two Factor plugin
1. Activate all four plugins.
1. If you want to make JS changes, then `cd settings && npm start`
1. Open `wp-admin/options-general.php?page=bbpress` and uncheck `Prefix all forum content with the Forum Root slug (Recommended)`, then save.
1. Visit https://example.org/users/{username}/edit/account/ to view the custom settings UI. If you get a `404` error, visit `wp-admin/options-permalinks.php` and then try again.
1. Visit `users/{username}/edit/account` to view the custom settings UI. If you get a `404` error, visit `wp-admin/options-permalinks.php` and then try again.

## Testing

Expand Down
5 changes: 5 additions & 0 deletions settings/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this would be better as a pre-push hook? I often make lots of WIP commits locally, and it can be annoying for the linter to run on those, since they're not intended to pass.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It used to support pre-push, but the usage for the new version has changed, and pre-push doesn't seem to work anymore 🤔 I've tried for a while and also checked if others have encountered the same issue, but no good news. Let me do more research to see if I can find a solution.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, it's not a huge deal if we keep it pre-commit, especially if later on we add an action to do it on push.

. "$(dirname -- "$0")/_/husky.sh"

cd settings
npx lint-staged
Loading