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

@form8ion/project

v18.1.5

Published

opinionated scaffolder for new projects

Downloads

1,827

Readme

project

opinionated scaffolder for new projects

Node CI Workflow Status OpenSSF Scorecard Codecov SLSA Level 2

Table of Contents

Features

  • configures generic editor settings through EditorConfig
  • scaffolds license details
  • scaffolds VCS details if git is chosen
  • scaffolds the chosen VCS Host details
  • scaffolds the chosen CI service config
  • scaffolds the project README.md
  • scaffolds language specific details by delegating to provided scaffolder functions

Usage

npm Snyk Vulnerabilities for npm package node MIT license

Installation

$ npm install @form8ion/project --save-prod

Consumption in a CLI tool

This scaffolder is intended to be used as a CLI tool, but it is left up to the consumer to provide the actual CLI wrapper. My sub-command for commander is an example of such a wrapper.

Example

Import

import {lift, questionNames, scaffold} from '@form8ion/project';

Execute

  await scaffold({
    decisions: {
      [questionNames.PROJECT_NAME]: 'my-project',
      [questionNames.LICENSE]: 'MIT',
      [questionNames.VISIBILITY]: 'Public',
      [questionNames.DESCRIPTION]: 'My project',
      [questionNames.GIT_REPO]: false,
      [questionNames.COPYRIGHT_HOLDER]: 'John Smith',
      [questionNames.COPYRIGHT_YEAR]: '2022',
      [questionNames.PROJECT_LANGUAGE]: 'foo'
    },
    languages: {
      foo: options => options
    }
  });

  await lift({
    projectRoot: process.cwd(),
    results: {},
    enhancers: {foo: {test: () => true, lift: () => ({})}},
    vcs: {}
  });

API

This is an opinionated scaffolder, but there are some aspects that are configurable in order to support multiple contexts.

Takes a single options object as an argument, containing:

languages (optional)

provides the languages to choose from and the functions to perform the scaffolding for the chosen language. if no languages are provided, Other will be the only choice presented. Choosing Other will perform no language-specific scaffolding. Official options are provided in the awesome list.

object:

  • keys: string Name of the language
  • values: function that scaffolds language specific details
    • receives an options object as its first argument to pass along answers to the project-level prompts
      • projectRoot: string path of the working directory where the CLI command was executed
      • projectName: string name chosen for the project. defaults to the directory name.
      • vcs: object details about the VCS host
        • host: string host name
        • name: string repository name. equal to projectName
        • owner: string account name on the host service for the repository owner. defaults to $ git config github.user
      • visibility: string Public or Private. defaults to Private
      • license: string identifier of the chosen SPDX License or UNLICENSED
      • ci: string name of the chosen CI service. defaults to Travis
      • description: string short summary of the project

vcsHosts (optional)

provides the vcs hosts to choose from and the functions to perform the scaffolding for the chosen host. if no hosts are provided, Other will be the only choice presented. Choosing Other will perform no host-specific scaffolding. Official options are provided in the awesome list.

object:

  • keys: string Name of the vcs host
  • values: object
    • prompt: function (required) prompts for host specific details
      • MUST return an object of the prompt answers, which MUST include the name of the account for the host that owns the repo as repoOwner
    • scaffolder: function (required) scaffolds the host options
      • receives an options object as its first argument to pass along answers to the project-level prompts
        • host: string name of the chosen host, as provided in the key of the vcsHosts object
        • name: string name chosen for the project. defaults to the directory name.
        • owner: the account name of the owner of the repo on the host, as returned from the prompt function
        • projectRoot: string path of the working directory where the CLI command was executed
        • description: string brief summary of the project
        • homepage: string url of the project homepage
    • public: boolean (optional) whether this host should be presented as a public option
    • private: boolean (optional) whether this host should be presented as a private option

dependencyUpdaters (optional)

provides the dependency updaters to choose from and the functions to perform the scaffolding for the chosen updater service. if no updater services are provided, Other will be the only choice presented. Choosing Other will perform no updater-service-specific scaffolding. Official options are provided in the awesome list.

object:

  • keys: string Name of the dependency update service
  • values: object
    • scaffolder: function (required) scaffolds the host options
      • receives an options object as its first argument to pass along answers to the project-level prompts
        • projectRoot: string path of the working directory where the CLI command was executed
      • vcs: object details about the VCS host
        • host: string host name
        • name: string repository name. equal to projectName
        • owner: string account name on the host service for the repository owner. defaults to $ git config github.user

Contributing

Conventional Commits Commitizen friendly PRs Welcome Renovate semantic-release: angular

Dependencies

$ nvm install
$ npm install

Verification

$ npm test

Related Projects

Inspiration