https://github.com/oknoorap/wp-theme-check
:heavy_check_mark: WordPress Theme Check in Node.js
https://github.com/oknoorap/wp-theme-check
php wordpress
Last synced: about 1 year ago
JSON representation
:heavy_check_mark: WordPress Theme Check in Node.js
- Host: GitHub
- URL: https://github.com/oknoorap/wp-theme-check
- Owner: oknoorap
- License: mit
- Created: 2017-04-16T08:44:04.000Z (about 9 years ago)
- Default Branch: develop
- Last Pushed: 2018-03-13T07:21:21.000Z (over 8 years ago)
- Last Synced: 2024-08-09T12:46:48.233Z (almost 2 years ago)
- Topics: php, wordpress
- Language: PHP
- Homepage:
- Size: 381 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# :heavy_check_mark: WordPress Theme Check
WordPress Theme Check in Node.js. [Theme Mentor](https://github.com/Ataurr/Theme-Mentor-For-Themeforest) and [Theme Check](https://wordpress.org/plugins/theme-check)
## Motivation
After 5 years developing themes in WordPress, I realize that implementing good workflow is hard. After wandering in javascript world, my perspective about workflow really changed. All tasks are automated. Today, I'm going back to WordPress world. Here is reason why this project is good for WordPress development workflow:
* You don't need to install WordPress and setup server in CI server.
* You don't need to install Plugin to check whether theme is valid or not.
* Your wasting time checking theme with plugin will be handled in Continous Integration script.
## :computer: Install
Using NPM
```bash
$ npm install wp-theme-check --save
```
Using Yarn
```bash
$ yarn add wp-theme-check
```
If you want to use CLI version, please install it globally.
```bash
# NPM
$ npm install wp-theme-check -g
# Yarn
# Use sudo in OSX
$ yarn global wp-theme-check
```
## Usage
```javascript
const themeCheck = require('wp-theme-check')
themeCheck(`/path/to/wordpress/wp-content/themes/theme-name`)
.then(logs => {
console.log(logs)
})
.catch(err => {
console.error(err.message)
})
```
## :zap: CLI
```bash
themecheck - WordPress theme check
USAGE
themecheck [path]
ARGUMENTS
[path] Script path could be theme directory. optional
OPTIONS
--with-theme-mentor Only use theme mentor as validator. optional
--with-theme-check Only use theme check as validator. optional
GLOBAL OPTIONS
-h, --help Display help
-V, --version Display version
--no-color Disable colors
--quiet Quiet mode - only displays warn and error messages
-v, --verbose Verbose mode - will also output debug messages
```
## Related
* [WPCS in Node.js](https://github.com/oknoorap/wpcs)
## License
MIT © [oknoorap](https://github.com/oknoorap)