From fad39e60ee6050975e89da0dc126c465535acd70 Mon Sep 17 00:00:00 2001 From: Julian Weiland Date: Fri, 26 Apr 2019 15:53:42 +0200 Subject: [PATCH 1/2] Scripts added to plugin package.json 1. `start` This represents the default grunt task in Gruntfile.js 2. `readme` This script represents the Grunt Task for Readme.md generation 3. `i18n` This script represents the Grund Task for .pot generation --- templates/plugin-packages.mustache | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/plugin-packages.mustache b/templates/plugin-packages.mustache index 84a60ca66..04a4733ec 100644 --- a/templates/plugin-packages.mustache +++ b/templates/plugin-packages.mustache @@ -4,6 +4,11 @@ "version": "0.1.0", "main": "Gruntfile.js", "author": "{{plugin_author}}", + "scripts" : { + "start" : "grunt default" , + "readme" : "grunt readme", + "i18n" : "grunt i18n" + }, "devDependencies": { "grunt": "~0.4.5", "grunt-wp-i18n": "~0.5.0", From 4f0ae20055bd29dd89e5084b999cbecb5cc58473 Mon Sep 17 00:00:00 2001 From: derweili Date: Sun, 5 May 2019 12:46:15 +0200 Subject: [PATCH 2/2] scripts added to scaffold plugin command description --- src/Scaffold_Command.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Scaffold_Command.php b/src/Scaffold_Command.php index 73c16a121..8fbd27c59 100644 --- a/src/Scaffold_Command.php +++ b/src/Scaffold_Command.php @@ -590,7 +590,7 @@ private function get_output_path( $assoc_args, $subdir ) { * * * `plugin-slug.php` is the main PHP plugin file. * * `readme.txt` is the readme file for the plugin. - * * `package.json` needed by NPM holds various metadata relevant to the project. Packages: `grunt`, `grunt-wp-i18n` and `grunt-wp-readme-to-markdown`. + * * `package.json` needed by NPM holds various metadata relevant to the project. Packages: `grunt`, `grunt-wp-i18n` and `grunt-wp-readme-to-markdown`. Scripts: `start`, `readme`, `i18n`. * * `Gruntfile.js` is the JS file containing Grunt tasks. Tasks: `i18n` containing `addtextdomain` and `makepot`, `readme` containing `wp_readme_to_markdown`. * * `.editorconfig` is the configuration file for Editor. * * `.gitignore` tells which files (or patterns) git should ignore.