Skip to content

Commit 1079917

Browse files
committed
Fixed gulpfile replace bug
1 parent e9526b6 commit 1079917

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

gulpfile.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,11 @@ var renameStrings = [
6666
[ 'VendorName\\PluginName', pkg.config.php_namespace ], // PHP namespace for your plugin
6767
[ 'VendorName\\\\PluginName', pkg.config.php_namespace.replace( /\\/g, '\\\\' ) ], // Rename Composer namespace
6868
[ 'wordpress-base-plugin', pkg.name ], // Plugin slug
69-
[ 'wordpress_base_plugin', pkg.name.replace( '-', '_' ) ], // Plugin underscored slug
70-
[ 'WPBP_NS', pkg.config.prefix.toUpperCase() + '_NS' ], // Unique JavaScript object for your plugin
69+
[ 'wordpress_base_plugin', pkg.name.replace( /-/g, '_' ) ], // Plugin underscored slug
70+
[ 'WPBP', pkg.config.prefix.toUpperCase() ], // Unique JavaScript object for your plugin
7171
[ 'wpbp', pkg.config.prefix ], // Replace remaining plugin prefixes
7272
[ 'WordPress Base Plugin', pkg.config.plugin_name ], // Replace plugin long name
7373
[ 'My Plugin', pkg.config.plugin_short_name ] // Replace plugin short name
74-
7574
];
7675

7776
/**
@@ -237,7 +236,7 @@ gulp.task( 'default', object_property_to_array( tasks_js, 'id', tasks_css ), fun
237236
*/
238237
gulp.task( 'rename', function () {
239238

240-
return gulp.src( [ './**/*.php', './*.json', './**/*.js', './**/*.scss', './*.txt', '!./node_modules/**', '!./vendor/**', '!./.git/**', '!./languages/**', '!./*lock*', '!./gulpfile.js' ] )
239+
return gulp.src( [ './**/*.php', './*.json', './**/*.js', './**/*.scss', './*.txt', './*.md', '!./node_modules/**', '!./vendor/**', '!./.git/**', '!./languages/**', '!./*lock*', '!./gulpfile.js' ] )
241240
.pipe( replace( renameStrings ) )
242241
.pipe( vinylPaths( del ) )
243242
.pipe( batchRename( function (path) {

0 commit comments

Comments
 (0)