From 0f230568e025592fd2dda60bcd29fa275a2f8e6b 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 c73daab4f4f7a38747464531fda147786c5c5618 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.