Skip to content

n370/npm-publish-slack-webhook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm publish Slack Webhook

How to use

npm install @n370/npm-publish-slack-webhook

Open your package's package.json and add a postpublish script to it;

{
    "scripts": {
        "postpublish": "npm-publish-slack-webhook <your-slack-webhook-url>"
    }
}

Every time you run npm publish and successfully publish a new package version you should get a message on slack like:

[email protected] has been published!

Testing

With npx
npx @n370/npm-publish-slack-webhook <your-slack-webhook-url>
Against a local server

Start the test server included with the source files

node tests/server.js

Open another terminal tab, link the library using npm link and test it against the local server.

npm-publish-slack-webhook "http://localhost:1337/"