Skip to content

Commit 34e3dbf

Browse files
authored
Merge pull request #225 from derweili/derweili-plugin-package-json-scripts
Scripts added to plugin `package.json`
2 parents 1012121 + c73daab commit 34e3dbf

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Scaffold_Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ private function get_output_path( $assoc_args, $subdir ) {
590590
*
591591
* * `plugin-slug.php` is the main PHP plugin file.
592592
* * `readme.txt` is the readme file for the plugin.
593-
* * `package.json` needed by NPM holds various metadata relevant to the project. Packages: `grunt`, `grunt-wp-i18n` and `grunt-wp-readme-to-markdown`.
593+
* * `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`.
594594
* * `Gruntfile.js` is the JS file containing Grunt tasks. Tasks: `i18n` containing `addtextdomain` and `makepot`, `readme` containing `wp_readme_to_markdown`.
595595
* * `.editorconfig` is the configuration file for Editor.
596596
* * `.gitignore` tells which files (or patterns) git should ignore.

templates/plugin-packages.mustache

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
"version": "0.1.0",
55
"main": "Gruntfile.js",
66
"author": "{{plugin_author}}",
7+
"scripts" : {
8+
"start" : "grunt default" ,
9+
"readme" : "grunt readme",
10+
"i18n" : "grunt i18n"
11+
},
712
"devDependencies": {
813
"grunt": "~0.4.5",
914
"grunt-wp-i18n": "~0.5.0",

0 commit comments

Comments
 (0)