generated from ryanwelcher/wordpress-project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5de574a
commit 66f42b5
Showing
2 changed files
with
265 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
# WordPress Code Examples Starter | ||
|
||
This template repository is pre-configured to provide all of the tools to format code to match the WordPress coding standards. | ||
# Newspack starter template for custom plugins | ||
|
||
This template is a pre-configured starting point for custom plugin development on the Newspack platform. | ||
It will give you all of the tools you needs to get up and running quickly. | ||
|
||
## What does it provide? | ||
|
||
1. Linting and formatting tools for PHP, JavaScript, CSS and package.json files. | ||
2. A GitHub action to that runs linting on PRs and merged to trunk. | ||
3. Build process provided by `@wordpress/scripts` | ||
1. A pre-configured build process provided by the `@wordpress/scripts` package. This is the standard build process for WordPress. For more information on configuration and options, please see the [official documentation](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-scripts/). | ||
2. A PHP CodeSniffer configuration that will check your code against the coding standards that are recommended by the Newspack team. | ||
3. A Prettier configuration for WordPress. | ||
4. Linting tools for CSS, JS and PHP | ||
5. A GitHub action to check that your commits and merges adhere to the correct coding standards | ||
6. A GitHub action to automatically deploy your changes when merged to trunk. (See the Setup section for how to enable this feature) | ||
|
||
## How do I use it? | ||
1. Start by clicking the `Use this template` to use this as a starting point for your project. | ||
2. Run `npm run setup` to install everything. | ||
3. If using VSCode add the following to your settings.json | ||
```json | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
}, | ||
``` | ||
|
||
1. Start by clicking the `Use this template` to use this as a starting point for your project. | ||
2. In the Secrets and Variables->Actions under the Settings menu of the new repository. Create new `SFTP_USER` and `SFTP_PASSWORD` secrets and add the credentials provided by NewPack for each. | ||
3. Checkout the repo locally and run `npm run setup` to install everything. | ||
4. Start developing! |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.