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

mini-cross

v0.15.2

Published

Provides user configured development environments

Downloads

13

Readme

mini-cross

Provides user configured development environments.

Configuration

---
base: ubuntu:18.04	# ①
install:
 - nodejs		# ②
 - npm
publish:
 - 8080:80		# ③
 - 8443:443
---
#!/bin/bash

sudo npm install -g mini-cross	# ④

The configuration file contains two sections: first a YAML frontmatter section followed by an optional shell script. Splitting the configuration into a declarative and an imperative section enables describing common operations with minimal boilerplate while still allowing arbitary actions.

  1. base describes the Docker image to be used as starting point for further setup.
  2. install contains a list of packages to be installed from the distribution's package manager
  3. publish contains a list of <host port>:<container port> declarations describing port forwarding from host to container
  4. A shell script containing arbritrary commands to be executed while creating the container's image

Since mini-cross needs to know how to install packages on a certain distribution, not all Docker images are supported as base images. Current support includes:

CLI

There two ways of invoking mini-cross

  1. The command invocation
  2. The shell invocation

While technically similar, they provide for different use cases. The first allows to run individual commands inside the development environment while remaining attached to the host shell. The second changes the point of view to the inside of the development environment so that multiple commands can be executed while attached to the same container.

Therefore the command invocation is more suitable for scripted usage while the second is crafted toward comfort for interactive use.

Command invocation

mini-cross <options>* <machine> <command>*

When using mini-cross with command invocation, a machine has always to be specified. The machine determines where to look for the mini-cross configuration and allows for multiple configurations in the same project. The special machine _ is the default machine (most useful for shell invocation though).

This command will start the referenced machine and execute the command using the default docker entry point (most likely a bash shell).

When using mini-cross in a CI, it might be benefitial to pass --no-tty as option in order to not require a pty.

Shell invocation

mini-cross [<machine>]

Invoking mini-cross without additional commands is referred to as shell invocation because the development environment will stay attached to the current shell. Multiple commands may now be executed inside the same container, which can be quit using the exit command (assuming the container uses a shell like bash as docker entry point).

Since the shell invocation does not use arguments, the machine name can be omited and _ (the default machine) will be assumed.