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

koshu

v0.6.2

Published

The honey flavoured task automation tool

Downloads

21

Readme

Koshu (shell)

NPM version Join the chat at https://gitter.im/kristofferahl/koshu-shell Codacy Badge CircleCI

The honey flavoured task automation tool

Installation

Prerequisites

  • bash 3.2 +

Local

Simply download koshu.sh to your project directory and execute koshu by typing ./koshu.sh.

Pre-release

curl https://raw.githubusercontent.com/kristofferahl/koshu-shell/master/src/koshu.sh > ./koshu.sh

Stable

curl https://raw.githubusercontent.com/kristofferahl/koshu-shell/0.5.4/src/koshu.sh > ./koshu.sh

To make running your "project local" koshu easier, you add an alias for koshu.sh to your shell.

alias koshu='./koshu.sh'

Global

You can install koshu globally using npm install koshu -g and execute it by typing koshu.

Setup

Run koshu init to create a "koshufile" in the current directory.

Koshufile

Tasks

Use the following syntax in your koshufile to define a task.

task setup {
  echo 'Setting up...'
}

You may also define a "default" task that is executed if no task name is passed to koshu.

task default {
  echo 'Running default task...'
}

Dependencies

You can define dependencies between your tasks by using the depends_on keyword followed by the name of the task you wish to depend upon.

task test {
  depends_on compile
}

In the example above, the compile task will be executed before any code placed after the depends_on statement is executed. A single task will never be executed more than once.

Executing tasks

./koshu.sh <taskname>

Parameters and environment variables

Parameters

Parameters you want set as variables can be passed to koshu by providing the -p or --param option followed by a name/value pair.

./koshu.sh <taskname> --param foo=bar

Default values can be set in your koshufile using the param function.

param foo='default value'

task default {
  echo "$foo"
}

Environment variables

Parameters you want set as environment variables can be passed to koshu by providing the -e or --env option followed by a name/value pair.

./koshu.sh <taskname> --env FOO=bar

Default values are currently not supported for the -e or --env option.

NOTE: Spaces

If a value includes spaces you need to quote it!

./koshu.sh <taskname> --param foo='some value for foo' --env BAR='some value for BAR'

Help

For more info on using koshu, please run the help command.

./koshu.sh help