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

code-forge

v1.0.10

Published

Create, store, and use scaffolding templates from a single, easy to use CLI.

Downloads

3

Readme

Code Forge

Code Forge is designed to allow you to easily create new scaffolded projects using your own templates. This project was conceived after the n-th time I installed an express app using their cli only to convert all the es5 code to es6.

It is also extremely useful for companies which have specific scaffolds for new projects, and it automates several minor project setup tasks.

Installation

npm i -g code-forge

Required Tools

Code forge relies on additional cli tools which are in common use, but for the sake of documentation are listed here: git, node, and npm.

General Features

  1. Stores a list of templates (which can be initialized from a company store)
  2. Initializes new projects with the code from the template selected
  3. Updates the project.json file using prompts similar to npm init while maintaining the rest of the original project.json file.
  4. Installs dependencies from the template, listed in the project.json file.

Usage

forge <command> (options)

Commands

build help info init load-remote ls rm set

build

Alias for init

help

List the summary version of available commands:

forge help

List specific help for a given command:

forge help <command>

info

List template details. For local templates this includes file count and total size for both the project files only and the entire project including the project's node_modules folder. .gitignore affects the results

Templates from git repos do not include size information as none is available.

forge info <template name>

init

Init retrieves the code within the template specified and installs it into the target directory if one is provided, or the current directory if none is provided. For safety it will only do so if the target directory is empty.

forge init <template name> (target directory)

# Target the current directory
forge init company-express-template
# -or-
forge init company-express-template .

# Target a sub-directory that may or may not already exist
forge init company-express-template super-project

load-remote

This command allows you to load an existing set of templates into your template database. This is useful for teams which desire to maintain a common list of templates.

In the case of a template name conflict the command will prompt the user to pick the template source they wish to keep. It will ignore templates which are exact matches, and add any new templates to the local template database.

forge load-remote <url>

ls

Lists the templates which have been installed to the local machine.

forge ls

rm

Remove an existing template from the template database. This will not remove local files or remote repos, just remove forge's reference to them.

forge rm <template name> 

set

Set associates a path or git repo with a template name. Therefore if you set a template name of awesome-scaffold to a directoy of /code/scaffold-code, the user could subsequently install all the code within /code/scaffold-code with the init command.

forge set <template name> <path or repo url>

forge set awesome-scaffold /code/scaffold-code

# Now you can install the scaffold with
cd working-code/projects
forge init awesome-scaffold new-project

# All the code will be installed 
#   the project.json will be configured 
#   and npm init will be run

Possible Features

  • Add size information to template database so that it can be displayed with ls and info even for repo templates (this would populate after the first time they were installed in the case of repos)

Issues

  • None known.