codekraft-studio / generator-wordpress-plugin Goto Github PK
View Code? Open in Web Editor NEW:wine_glass: The best way to start creating your WordPress plugin projects.
License: Other
:wine_glass: The best way to start creating your WordPress plugin projects.
License: Other
Add some tests generated with the submodules main php classes.
Write an extensive documentation with examples and stuff for the main generator and the subgenerators. Also something about how the generation works and what has to offer.
Add more command line options to metabox subgenerator to allow the maximum customization of the output.
Some of the options could be:
$screen
(string|array|WP_Screen) (Optional) The screen or screens on which to show the box (such as a post type, 'link', or 'comment').
Accepts a single screen ID, WP_Screen object, or array of screen IDs. Default is the current screen.
Default value: null
$context
(string) (Optional) The context within the screen where the boxes should display.
Available contexts vary from screen to screen. Post edit screen contexts include 'normal', 'side', and 'advanced'. Comments screen contexts include 'normal' and 'side'. Menus meta boxes (accordion sections) all use the 'side' context. Global
Default value: 'advanced'
$priority
(string) (Optional) The priority within the context where the boxes should show ('high', 'low').
Default value: 'default'
snippet above took from WordPress add_metabox codex page.
Actually if the user tries to run a sub generator within a folder that doesn't contain a previously generated project it will not work, but the check should be made as first before asking subgenerator questions or trying to generate it.
Since php-writer has great capabilities in terms of manipulating php files, all or most of the wordpress plugin files manipulation should be handled with that.
For example, comments block updates, variables updates and composite files creation, but it requires an investigation and a deepening reading of the code, that will lead to a refactoring.
If the user tries to generate over a existing folder or a previously generated project, alert him that this operation could possibly broke everything since it will override the basic project files.
This is handled by default from inquirer when trying to copy the files but it should be clear from the beginning before starting to answer the project prompt questions, so the operation can be easily stopped without loosing time.
The package templates makes use on the @since tag with the version number at the time when this particular file was generated using the generator.
Since the version is stored in the yo-rc.json
file and the real version is presumably updated via npm
or yarn
commands, the generator needs to keep sync between the two versions.
Add the support in plugin templates and options for webpack project manager.
The current beheviour is to throw if the folder is not empty, it should be better to check if folder is empty (when input isn't name passed the current process.pwd folder will be used) and eventually ask for confirmation using inquirer or in case of rejection just exit the program
Since the new mode has introduced the main-class writing functions, every subgenerator that has this feature enabled will update the main-class file when called (subgenerator).
If it exists another file or class with the same name, don't add it or override it and most important of all, inform in a very verbose way the user about what is going on.
Add support for settings pages (menu pages, options pages, submenu pages etc..) generation, automatic loading.
It could be useful to have subgenerators and relative templates for plugin registration of wpcli commands:
https://make.wordpress.org/cli/handbook/commands-cookbook/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.