Skip to content

Commit

Permalink
Fixed gulpfile replace bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dmhendricks committed Jan 22, 2018
1 parent e9526b6 commit 1079917
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,11 @@ var renameStrings = [
[ 'VendorName\\PluginName', pkg.config.php_namespace ], // PHP namespace for your plugin
[ 'VendorName\\\\PluginName', pkg.config.php_namespace.replace( /\\/g, '\\\\' ) ], // Rename Composer namespace
[ 'wordpress-base-plugin', pkg.name ], // Plugin slug
[ 'wordpress_base_plugin', pkg.name.replace( '-', '_' ) ], // Plugin underscored slug
[ 'WPBP_NS', pkg.config.prefix.toUpperCase() + '_NS' ], // Unique JavaScript object for your plugin
[ 'wordpress_base_plugin', pkg.name.replace( /-/g, '_' ) ], // Plugin underscored slug
[ 'WPBP', pkg.config.prefix.toUpperCase() ], // Unique JavaScript object for your plugin
[ 'wpbp', pkg.config.prefix ], // Replace remaining plugin prefixes
[ 'WordPress Base Plugin', pkg.config.plugin_name ], // Replace plugin long name
[ 'My Plugin', pkg.config.plugin_short_name ] // Replace plugin short name

];

/**
Expand Down Expand Up @@ -237,7 +236,7 @@ gulp.task( 'default', object_property_to_array( tasks_js, 'id', tasks_css ), fun
*/
gulp.task( 'rename', function () {

return gulp.src( [ './**/*.php', './*.json', './**/*.js', './**/*.scss', './*.txt', '!./node_modules/**', '!./vendor/**', '!./.git/**', '!./languages/**', '!./*lock*', '!./gulpfile.js' ] )
return gulp.src( [ './**/*.php', './*.json', './**/*.js', './**/*.scss', './*.txt', './*.md', '!./node_modules/**', '!./vendor/**', '!./.git/**', '!./languages/**', '!./*lock*', '!./gulpfile.js' ] )
.pipe( replace( renameStrings ) )
.pipe( vinylPaths( del ) )
.pipe( batchRename( function (path) {
Expand Down

0 comments on commit 1079917

Please sign in to comment.