不要怂,就是干,撸起袖子干!

Commit a0f9e8da by Mick Hansen

Merge pull request #525 from masonblier/master

Option to change file type regex filter in Migrator instances
2 parents 8244acc2 39290016
Showing with 3 additions and 2 deletions
......@@ -12,7 +12,8 @@ module.exports = (function() {
path: __dirname + '/../migrations',
from: null,
to: null,
logging: console.log
logging: console.log,
filesFilter: /\.js$/
}, options || {})
if (this.options.logging === true) {
......@@ -96,7 +97,7 @@ module.exports = (function() {
}
var migrationFiles = fs.readdirSync(this.options.path).filter(function(file) {
return /\.js$/.test(file)
return self.options.filesFilter.test(file)
})
var migrations = migrationFiles.map(function(file) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!