thiagolcks / generator-wp-plugin-boilerplate Goto Github PK
View Code? Open in Web Editor NEWA generator for Yeoman to customize the WP Plugin Boilerplate (https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate).
License: MIT License
A generator for Yeoman to customize the WP Plugin Boilerplate (https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate).
License: MIT License
Hey,
Thanks for putting this tool together. Definitely great quick way to set up a boilerplate WP plugin. I noticed that class names are being camel cased. The WordPress coding standard is to use initial caps with underscores Like_This for classes.
http://make.wordpress.org/core/handbook/coding-standards/php/#naming-conventions
I took a quick look to see if there was a quick solution but looks like underscore.string doesn't offer a method to format the string that way. Not sure if that's why you went with _s.classify? I wonder if underscore.string would accept a PR for a _s.capunderscored method or something like that, or if there's an alternate solution that is better. Would be great to find a solution here so that plugins can be scaffolded to follow WP standards.
Max
executing this command:
yo wp-plugin-boilerplate
it finishes with this error:
Downloading the WP Plugin Boilerplate...
File downloaded
All done!
fs.js:81
throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs
^
Error: ENOENT, rename 'my-plugin/plugin-name.php'
at Error (native)
Hope you can do something with this.
while setting up the files some problem occurs with renaming files. The path seems not to be correct. Please see the output of yo wp-plugin-boilerplate
:
[?] What do you want to call your plugin? test
[?] What is your new plugin's version? 1.0.0
[?] What is your name? was
[?] What is your e-mail? [email protected]
[?] What is your URL? https://github.com/my-user
[?] What goes in copyright tags?
[?] Which resources your plublic site needs? JS, CSS
[?] Which resources your plugin needs? Activate Method, Deactivate Method, Uninstall File
[?] Does your plugin need an admin page? Yes
Downloading the WP Plugin Boilerplate...
File downloaded
All done!
fs: missing callback Error: ENOENT, rename 'test/plugin-name.php'
fs: missing callback Error: ENOENT, rename 'test/admin/class-plugin-name-admin.php'
fs: missing callback Error: ENOENT, rename 'test/public/class-plugin-name.php'
{ [Error: ENOENT, open 'test/test.php'] errno: 34, code: 'ENOENT', path: 'test/test.php' }
{ [Error: ENOENT, open 'test/public/class-test.php'] errno: 34, code: 'ENOENT', path: 'test/public/class-test.php' }
{ [Error: ENOENT, open 'test/admin/class-test-admin.php']
errno: 34,
code: 'ENOENT',
path: 'test/admin/class-test-admin.php' }
{ [Error: ENOENT, open 'test/public/views/public.php']
errno: 34,
code: 'ENOENT',
path: 'test/public/views/public.php' }
{ [Error: ENOENT, open 'test/admin/views/admin.php'] errno: 34, code: 'ENOENT', path: 'test/admin/views/admin.php' }
{ [Error: ENOENT, open 'test/uninstall.php'] errno: 34, code: 'ENOENT', path: 'test/uninstall.php' }
{ [Error: ENOENT, open 'test/README.txt'] errno: 34, code: 'ENOENT', path: 'test/README.txt' }
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.