db-migrate / db-migrate/db-migrate-base

How to add a custom command?

Open
#19 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7
Forks
16
PR merge metrics
No merged PRs in 30d

Description

I'd like to create a custom command, and maybe make a plugin out of it for those who might need it.

I don't see any documentation on how to do it, and current plugins don't add commands.

Current plugin looks like this

```js
module.exports = {

loadPlugin: function() {

module.exports = Object.assign(module.exports, {

'init:api:addfunction:hook': function() {

console.log('custom command')

return {};
}
});

delete module.exports.loadPlugin;
},
name: 'fresh',
hooks: [
'init:api:addfunction:hook'
]
};
```

It's loaded successfully as a plugin but I can't find out how to add it to the bin file & add it as an actual command

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/90965201-how-to-add-a-custom-command?utm_campaign=plugin&utm_content=tracker%2F11792942&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F11792942&utm_medium=issues&utm_source=github).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.