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

matron

v1.0.12

Published

> A Domain Specific Language à-la Dockerfile with a CLI to scaffold your projects.

Downloads

85

Readme

Matron

A Domain Specific Language à-la Dockerfile with a CLI to scaffold your projects.

npm npm CircleCI (all branches)

Installation

Using npx

If you don't prefer to install the CLI, you can use it through npx this way

npx matron --help

Install with npm

You can also install the CLI globally

npm i -g matron
matron --help

Quick start

The minimal setup required to use matron and scaffold a new project is a matron.yml file.

Let's start with the example below:

📄 matron.yml

jobs:
  create-folder:
    name: Create project folder
    steps:
      - RUN: npx mkdirp ${PROJECT_PATH}
  init-project:
    name: Initialize package.json
    steps:
      - WORKDIR: ${PROJECT_PATH}
      - RUN: npm init -y
  add-typescript:
    name: Add TypeScript
    steps:
      - RUN: yarn add -D typescript

▶️ matron command

matron create --matron-file=./matron.yml --project my-project

Let's break down each steps:

  1. Create project folder

    1. RUN: npx mkdirp ${PROJECT_PATH}: With the RUN command you can execute any command that is possible to execute on your shell.
    2. Here we are using mkdirp to create a folder at the path my-project.
    3. ${PROJECT_PATH} is a default environment variable provided when you specify the option --project.
  2. Initialize package.json

    1. WORKDIR: ${PROJECT_PATH}: With the WORKDIR command, all the subsequent RUN commands will be executed in the specified path, in this case ${PROJECT_PATH} equals my-project.
    2. RUN: npm init -y: This will create a minimal package.json file.
  3. Add TypeScript

    1. RUN: yarn add -D typescript: Add TypeScript as dev dependencies.

When executed, this will result in the following file tree:

my-project
├── node_modules
├── package.json
└── yarn.lock

💡You can learn more about the available commands here.

💡You can learn more about matron file schema here.

Commands

matron create

Create a project using a matron file

matron create [--matron-file] [--project] [--template] [--env-folder]

Options

Name | Alias | Description ------------------|-------|---------------------------------------------- --matron-file | -f | Matron file path. --project | -p | Name or Path of the project to create. --template | -t | Folder containing at least a matron.yml file. --env-folder | | .env files folder. --help | | Show help

Examples

# Creates a project at ./my-project using ./matron.yml file
matron create --matron-file=./matron.yml --project my-project

# Creates a project at path/to/ts-project using a template folder containing a matron.yml file and/or a .env file
matron create --template ./matron-templates/typescript --project path/to/ts-project

Matron File

Schema

Environments variables

Dynamic variables

Dotenv variables