Skip to content

Commit

Permalink
Merge branch 'release/2.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ediamin committed Dec 11, 2019
2 parents 2983fba + d71a7ab commit b6403aa
Show file tree
Hide file tree
Showing 84 changed files with 7,526 additions and 5,257 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"plugins": [
[
"@babel/plugin-proposal-class-properties"
"@babel/plugin-proposal-optional-chaining"
]
]
}
8 changes: 6 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ module.exports = {
...defaultConfig,
rules: {
'@wordpress/dependency-group': 'error',
'indent': [ 'error', 4 ],
indent: [ 'error', 4 ],
'react/jsx-indent': [ 'error', 4 ],
'react/jsx-indent-props': [ 'error', 4 ],
}
},
globals: {
wpConsole: true,
ace: true,
},
};
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
# WP Console - WordPress PHP Console powered by PsySH

### Description
WP Console brings the famous PsySH on your browser. PsySH is a runtime developer console, interactive debugger and REPL for PHP.

Write your code in code editor, press `Shift+Enter` and get your output in your browser.
Write your code in code editor, press Cmd-Enter(mac) or Ctrl-Enter(win/linux) and get your output in your browser.

You can also use PsySH with wp-cli with the command `wp shell`. wp-cli has built-in support for psysh already. You need to just active WP Console to use this.
You can also use PsySH with wp-cli with the command `wp shell`. wp-cli has built-in support for psysh already. You need to just activate WP Console to use this.

WP Console requires WordPress v5.0 or later.

### Features
- Powerful code editor powered by Ace Editor.
- PHP core and WordPress functions live autocompletion with placeholders.
- `_dump` as the alternative to `var_dump` which uses Symfony VarDumper.
- Get debug.log contents and clear them right from your browser.
- Advanced shell powered by psySH for `wp shell`
- Custom code snippet(coming soon).
- Change editor theme(coming soon).
- WordPress function definition docblock(coming soon).
- Customized editor key bindings(coming soon).

Please note that, currently PsySH commands like `ls`, `doc`, `show` etc and Magic variables like `$_`, `$__class` etc are not supported in browser console.

👉 WP Console uses Gutenberg packages and components for its UI/UX.

### Security Concern
WP Console explicitly checks for `manage_options` permission to display the UI and perform other actions. Yet, this plugin should not be used in production server.
17 changes: 17 additions & 0 deletions assets/vendor/ace-builds/src-min-noconflict/ace.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions assets/vendor/ace-builds/src-min-noconflict/theme-xcode.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions assets/vendor/ace-builds/src-min-noconflict/worker-php.js

Large diffs are not rendered by default.

191 changes: 0 additions & 191 deletions assets/vendor/codemirror/addon/edit/closebrackets.js

This file was deleted.

Loading

0 comments on commit b6403aa

Please sign in to comment.