Skip to content

Instantly share code, notes, and snippets.

@jdx
Created August 24, 2017 20:48
Show Gist options
  • Save jdx/05d1dc9e73de5c4cb101f8c4c2c21423 to your computer and use it in GitHub Desktop.
Save jdx/05d1dc9e73de5c4cb101f8c4c2c21423 to your computer and use it in GitHub Desktop.
// ./package.json
{
'cli-engine': {
events: {
preRun: './lib/events/pre_run.js'
}
}
}
// ./lib/events/before_run.js
module.exports = async function preRun (config, command) {
http.post('https://myanalyticsservice/record', {
command: command.name,
user: config.user
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment