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

generator-armed

v0.0.1-4

Published

Generator for ARM template projects

Downloads

9

Readme

Armed

Armed is a yeoman generator that simplifies the development of ARM templates using a code-first compositional approach. It produces a solution consisting of a number of ARM template fragments which are merged together without the need for pre-processing or transformation. This maintains editing compatibility with the Azure Resource Manager (ARM) Tools for Visual Studio Code (Preview) Visual Studio Code extension from Microsoft.

Quick Start

Pre-requisites

  • Install/update PowerShell Az or the azure-cli.

  • Install/update node & npm for your platform nodejs.org.

  • Install gulp globally - global install is required for VS Code to detect gulp build tasks.

    npm install --global gulp
  • Install yeoman - see yeoman's docs for a detailed walkthrough.

    npm install --global yo
  • Install armed from the npm repository, or to use a clone of this repository see the Contributing section below.

    npm install --global generator-armed

Creating an armed project

  • Open your favorite terminal and create a new folder for your project:

    mkdir my-armed-project
    cd my-armed-project
  • Run npm init to initialize your project. See npm's docs for a more detailed walkthrough of this process. (Note: we expect to automate this step at some point.)

    npm init

    which will give output similar to:

    This utility will walk you through creating a package.json file.
    It only covers the most common items, and tries to guess sensible defaults.
    
    See `npm help json` for definitive documentation on these fields
    and exactly what they do.
    
    Use `npm install <pkg>` afterwards to install a package and
    save it as a dependency in the package.json file.
    
    Press ^C at any time to quit.
    package name: (my-armed-project)
    version: (1.0.0)
    description: Super cool armed project!
    entry point: (index.js)
    test command:
    git repository:
    keywords: arm
    author: Ricky Swift
    license: (ISC)
    About to write to C:\Users\StevenRose\source\repos\my-armed-project\package.json:
    {
      "name": "my-armed-project",
      "version": "1.0.0",
      "description": "Super cool armed project!",
      "main": "index.js",
      "scripts": {
        "test": "echo \"Error: no test specified\" && exit 1"
      },
      "keywords": [
        "arm"
      ],
      "author": "Ricky Swift",
      "license": "ISC"
    }
    
    
    Is this OK? (yes)
  • Install gulp packages required for building your armed solution (Note: we expect to automate this step at some point.)

    npm install gulp-clean gulp-bump gulp-replace --save-dev
  • Run the armed generator: Armed will prompt you for any required inputs - you can accept the defaults by pressing return or enter your own values.

    yo armed

    which will give output similar to:

    ? Your project name my-armed-project
    ? Add tenant deployment true
    ? Add subscription deployment true
    ? Add group deployment true
    ? Name of group deployment core
      create .gitignore
      create .vscode\snippets.code-snippets
      create gulpfile.js
      create deployments\tenant\tenant-deployment.json
      create deployments\subscription\subscription-deployment.json
      create deployments\core\_deployment.json
      create deployments\core\_parameters.json
      create deployments\core\resources.json
      create deployments\core\variables.json
      create deployments\core\functions.json
      create deployments\core\outputs.json

Output

This will create a folder structure like this:

.
├───.vscode
└───deployments
    ├───_common
    ├───core
    ├───subscription
    └───tenant

.vscode

Contains vscode config files including solution specific settings, snippets etc.

deployments/_common

This folder contains files that will be included with all deployments. By default it contains 2 files:

    functions.json
    variables.json
  • functions.json should contain any functions that need to be consistent across all deployments e.g. functions used to generate resource names.
  • variables.json should contain variables that need to be consistent across all deployments.

deployments/core

    _deployment.json
    _parameters.json
    resources.json
    outputs.json

Files

_deployment.json

File name can be overridden in .yo-rc.json (not yet supported)

This file contains ...

{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "",
    "apiProfile": "",
    "parameters": {  }
  }

Note: only schema and parameter objects are required. Parameters can be empty.

Example:

{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0",
    "parameters": {  

    }
  }
_parameters.json

File name can be overridden in .yo-rc.json (not yet supported)

{
    "parameters": {  }
}

Example:

{
    "parameters": {  }
}

Generators

armed

yo armed

Sub-generators

Deployment

A deployment contains a set of resources to be deployed to a single resource group - see Azure docs on resource groups here. An armed solution can contain deployments for multiple different resource groups

yo armed:deployment

Data Factory

yo armed:data-factory

Dataset

yo armed:dataset

Data Flow

yo armed:data-flow

Pipeline

yo armed:pipeline

Linked Service

yo armed:linked-service

Logic App

yo armed:logic-app

Contributing

Clone this repo.

git clone https://github.com/stvnrs/generator-armed

Link the armed generator

cd generator-armed
npm link

Note: in your target solution you will need to manually initialize the package and locally install dependencies

npm init
npm install gulp-clean gulp-bump gulp-replace

Any changes made in the generator-armed solution will be available immediately in your target solution.

Licence

The source code in this repository is licensed under the ISC license.