Skip to content

Commit e706981

Browse files
authored
Merge pull request #337 from ernilambar/140-remove-grunt
2 parents 036c515 + 6ae983a commit e706981

File tree

6 files changed

+15
-84
lines changed

6 files changed

+15
-84
lines changed

features/scaffold.feature

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,7 @@ Feature: WordPress code scaffolding
209209
And the {PLUGIN_DIR}/hello-world/.editorconfig file should exist
210210
And the {PLUGIN_DIR}/hello-world/hello-world.php file should exist
211211
And the {PLUGIN_DIR}/hello-world/readme.txt file should exist
212-
And the {PLUGIN_DIR}/hello-world/package.json file should exist
213-
And the {PLUGIN_DIR}/hello-world/Gruntfile.js file should exist
212+
And the {PLUGIN_DIR}/hello-world/composer.json file should exist
214213
And the {PLUGIN_DIR}/hello-world/.gitignore file should contain:
215214
"""
216215
.DS_Store
@@ -219,6 +218,7 @@ Feature: WordPress code scaffolding
219218
Thumbs.db
220219
wp-cli.local.yml
221220
node_modules/
221+
vendor/
222222
"""
223223
And the {PLUGIN_DIR}/hello-world/.distignore file should contain:
224224
"""
@@ -254,14 +254,10 @@ Feature: WordPress code scaffolding
254254
Tested up to: {WP_VERSION}
255255
"""
256256

257-
When I run `cat {PLUGIN_DIR}/hello-world/package.json`
258-
Then STDOUT should be JSON containing:
259-
"""
260-
{"author":"Hello World Author"}
261-
"""
262-
And STDOUT should be JSON containing:
257+
When I run `cat {PLUGIN_DIR}/hello-world/composer.json`
258+
Then STDOUT should contain:
263259
"""
264-
{"version":"0.1.0"}
260+
wp-cli/i18n-command
265261
"""
266262

267263
Scenario: Scaffold a plugin by prompting

src/Scaffold_Command.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,8 +671,7 @@ public function plugin( $args, $assoc_args ) {
671671
$files_to_create = [
672672
$plugin_path => self::mustache_render( 'plugin.mustache', $data ),
673673
$plugin_readme_path => self::mustache_render( 'plugin-readme.mustache', $data ),
674-
"{$plugin_dir}/package.json" => self::mustache_render( 'plugin-packages.mustache', $data ),
675-
"{$plugin_dir}/Gruntfile.js" => self::mustache_render( 'plugin-gruntfile.mustache', $data ),
674+
"{$plugin_dir}/composer.json" => self::mustache_render( 'plugin-composer.mustache', $data ),
676675
"{$plugin_dir}/.gitignore" => self::mustache_render( 'plugin-gitignore.mustache', $data ),
677676
"{$plugin_dir}/.distignore" => self::mustache_render( 'plugin-distignore.mustache', $data ),
678677
"{$plugin_dir}/.editorconfig" => file_get_contents( self::get_template_path( '.editorconfig' ) ),

templates/plugin-composer.mustache

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"require-dev": {
3+
"wp-cli/i18n-command": "^2"
4+
},
5+
"scripts": {
6+
"makepot": "wp i18n make-pot ."
7+
}
8+
}

templates/plugin-gitignore.mustache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ phpunit.xml
44
Thumbs.db
55
wp-cli.local.yml
66
node_modules/
7+
vendor/
78
*.sql
89
*.tar.gz
910
*.zip

templates/plugin-gruntfile.mustache

Lines changed: 0 additions & 56 deletions
This file was deleted.

templates/plugin-packages.mustache

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)