Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add a custom command? #19

Open
depsimon opened this issue Mar 28, 2020 · 0 comments
Open

How to add a custom command? #19

depsimon opened this issue Mar 28, 2020 · 0 comments

Comments

@depsimon
Copy link

depsimon commented Mar 28, 2020

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

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! We accept bounties via Bountysource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant