npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mk-release

v1.0.1

Published

application releaser cli with github and aws s3 support.

Downloads

37

Readme

mk-release

Circle CI

Creating a Github or a AWS S3 release has never been easier.

Table of Contents

Install

$ npm install -g mk-release

Usage


const release = require('mk-release');

// create a github release
release
  .github({
    user: 'YOUR_GITHUB_USERNAME',
    repo: 'YOUR_GITHUB_REPO_NAME',
    accessToken: 'YOUR_PERSONAL_GITHUB_ACCESS_TOKEN'
  })
  .then(() => console.log('Done.'))
  .catch(err => console.log(`Oops... ${err.message}`));

//create an AWS S3 release
release
  .s3({
    accessKey: 'YOUR_AWS_S3_ACCESS_KEY_ID',
    secret: 'YOUR_AWS_S3_SECRET_KEY',
    bucket: 'YOUR_AWS_S3_BUCKET_NAME'
  })
  .then(() => console.log('Done.'))
  .catch(err => console.log(`Opps... ${err.message}`));

CLI

$ mk-release [options]

  options (Github):
    --gh-user       The github user who owns the repo.
    --gh-repo       The name of the github repo which has the release.
    --gh-token      Github personal access token to prove that you have access to the repo.

  options (AWS S3):
    --aws-access-key-id       The Amazon Web Services S3 [access key id](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html).
    --aws-secret-access-key   The Amazon Web Services S3 [secret key](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html).
    --aws-bucket              The name of your AWS S3 [bucket](http://docs.aws.amazon.com/AmazonS3/latest/gsg/CreatingABucket.html) in which you want the release file to be.

  options (Common):
    --version       The (semantic) version of the release.
    --asset-folder  The path where the release file is located.

Environment Variables

The CLI optionally accepts the following environment variables.

It's pretty useful for example when you'd like to set these sensitive properties on a CI system's (like Circle) UI.

NOTE: The option arguments has higher precedence over environment variables.

GITHUB_USER

The github user who owns the repo.

GITHUB_REPO

The name of the github repo which has the release.

GITHUB_ACCESS_TOKEN

Github personal access token to prove that you have access to the repo.

AWS_ACCESS_KEY_ID

The Amazon Web Services S3 access key id.

AWS_SECRET_ACCESS_KEY

The Amazon Web Services S3 secret key.

AWS_BUCKET

The name of your AWS S3 bucket in which you want the release file to be.

RELEASE_VERSION

The (semantic) version of the release.

RELEASE_ASSET_FOLDER

The path where the release file is located.

API

github(options);

Return: Promise

options.user required

The github user who owns the repo.

Type: String

options.repo required

The name of the github repo which has the release.

Type: String

options.accessToken required

Github personal access token to prove that you have access to the repo. Here you can find how you can create one.

Type: String

options.version

The (semantic) version of the release.

Type: String Default: By default the script parses the package.json to get the version.

options.path

The path where the release file is located.

Type: String Default: the release folder in the root of your project.


s3(options);

Return: Promise

options.accessKey required

The Amazon Web Services S3 access key id.

Type: String

options.secret required

The Amazon Web Services S3 secret key.

Type: String

options.bucket required

The name of your AWS S3 bucket in which you want the release file to be.

Type: String

options.version

Type: String Default: By default the script parses the package.json to get the version.

options.path

Type: String Default: the release folder in the root of your project.


NOTE: By default, all the releasers use the following pattern when they look for the release file (in case the version of your release is 1.0.0):

./release/1.0.0.tgz

The release file itself always has to be named after the release version and always has to be a .tgz.

If you'd like to put this file to a different location, it's fine just make sure you pass the appropriate path in the options object.

License

The MIT License (MIT)

Copyright (c) 2016 Purpose Industries

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.