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 make homemade plugin (getting started) #14

Open
59naga opened this issue Apr 8, 2016 · 4 comments
Open

How to make homemade plugin (getting started) #14

59naga opened this issue Apr 8, 2016 · 4 comments

Comments

@59naga
Copy link
Member

59naga commented Apr 8, 2016

In the original design. if use a relative path at the plugin name(e.g. --./plugin.js), had been expected to be able to use immediately. this to fail.

module.exports = (asyncEmitter, cliValue, jsonOptions) => {
  console.log('hello, abigail')
}
abby --./plugin.js
# Error: Cannot find module '/plugin'

should be aggressive.

@59naga 59naga changed the title How to make homemade plug-ins (getting started) How to make homemade plugin (getting started) Apr 8, 2016
@59naga 59naga closed this as completed in 489d42a Apr 8, 2016
@59naga
Copy link
Member Author

59naga commented Apr 8, 2016

if use quickly the your plugin, specify after the dash. in v1.4.1

// my-plugin.js
'use strict';
module.exports = class MyPlugin {
  constructor(asyncEmitter, cliValue, jsonOptions) {
    console.log('hello, abigail');
  }
};
abby -- ./my-plugin.js
# hello, abigail
#
#
#               _ |_ . _  _ .|
#              (_||_)|(_)(_|||    v1.4.1
#              _/                 a minimal task runner.
#
#                     github.com/abigailjs/abigail#usage
#

@59naga
Copy link
Member Author

59naga commented Apr 8, 2016

missing cli value :(

    console.log('hello, abigail', cliValue);
abby -- ./my-plugin.js value
# hello, abigail undefined

@59naga 59naga reopened this Apr 8, 2016
59naga added a commit that referenced this issue Apr 8, 2016
@59naga 59naga closed this as completed Apr 8, 2016
@59naga
Copy link
Member Author

59naga commented Apr 8, 2016

available at v1.4.2:

abby --./my-plugin.js value
# hello, abigail value

@59naga
Copy link
Member Author

59naga commented Apr 10, 2016

document is missing. (like a writing-a-plugin - gulp)

@59naga 59naga reopened this Apr 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant