Skip to content

Commit

Permalink
Fix match folder regexp
Browse files Browse the repository at this point in the history
Support match hyphenate
  • Loading branch information
booxood committed Aug 29, 2016
1 parent abed14e commit fa45ee0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = yeoman.generators.Base.extend({
message: 'Choices component path:',
choices: function () {
var dirs = [];
var reg = new RegExp('^(client|app|src)/(component|container|view|)(s)?/([a-z]*/)*$');
var reg = new RegExp('^(client|app|src)/(component|container|view|)(s)?/([a-z|-]*/)*$');
var entries = walkSync.entries('.', {globs: ['client/**/*', 'app/**/*', 'src/**/*']});
entries.forEach(function (entry) {
if (entry.isDirectory() && reg.test(entry.relativePath)) {
Expand Down

0 comments on commit fa45ee0

Please sign in to comment.