-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add npmpage + an example on how to use the library
- Loading branch information
Showing
4 changed files
with
105 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { KbAnnounceIt, PackageDetails } from '@kibibit/announce-it'; | ||
|
||
const announceIt = new KbAnnounceIt({ | ||
accessTokenKey: 'TWITTER_ACCESS_KEY', | ||
accessTokenSecret: 'TWITTER_ACCESS_SECRET', | ||
consumerKey: 'TWITTER_CONSUMER_KEY', | ||
consumerSecret: 'TWITTER_CONSUMER_SECRET' | ||
}); | ||
|
||
const myPackage: PackageDetails = require('./package'); | ||
|
||
// get generated tweet | ||
const tweet: string = announceIt.generateTweet(myPackage); | ||
|
||
console.log('going to publish this tweet!', tweet); | ||
|
||
// publish tweet to twitter | ||
announceIt.announceRelease(myPackage); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "as-a-node-module", | ||
"version": "1.0.0", | ||
"description": "this is an example for using announce it as a node module", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "k1b1b0t", | ||
"license": "ISC", | ||
"announcements": { | ||
"tweet": "Version <%= version %> of <%= package %> is live! check it out <%=homepage %>" | ||
}, | ||
"dependencies": { | ||
"@kibibit/announce-it": "file:../.." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters