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

@mountainpass/cool-bits-for-projen

v0.2.8

Published

A collection of cool projen components

Downloads

6,751

Readme

cool-bits-for-projen

A collection of cool projen components

License npm npm downloads FOSSA Status

Build Status GitHub issues GitHub pull requests

source code vulnerabilities npm package vulnerabilities

Conventional Commits code style: prettier Contributor Covenant

I love badges

Installation & Usage

  1. If you don't have projen installed and configured, you'll need to go do that first.

  2. Add @mountainpass/cool-bits-for-projen to you development dependencies. e.g., in your .projenrc.ts

const project = new TypeScriptProject({
    //...
    devDeps: [
        //...
        "@mountainpass/cool-bits-for-projen"
    ],
    //...
});

or

const project = new TypeScriptProject({
    //...
});
project.addDevDeps("@mountainpass/cool-bits-for-projen");
  1. Run npx projen to regenerate the project files

  2. Add the components to you project in your .projenrc.ts file. For example, to add all the recommended components, add Recommended

import { Recommended } from "@mountainpass/cool-bits-for-projen";

//...

const project = new TypeScriptProject({
    ...Recommended.defaultProjectOptions,
    //...
});

new Recommended(project);

//...

project.synth();

or you can add individual components

import { Husky, EslintUnicorn } from "@mountainpass/cool-bits-for-projen";

//...

const project = new TypeScriptProject({
    ...EslintUnicorn.defaultProjectOptions,
    //...
});

new Husky(project);
new EslintUnicorn(project);

//...

project.synth();
  1. Run npx projen to generate the project files

Components

| Component | Functionality | Uses | Base Project Type Required | Included in Recommended | | ----------- | ----------- | ----------- | ----------- | ----------- | | CodeOfConduct | Add a Contributor Covenant v2.1 CODE_OF_CONDUCT.md to your project.NOTE: CodeOfConduct is not automatically included in the Recommended component because we believe adopting the Contributor Covenant should be a conscious deliberate decision and not something done inadvertently. We actively recommend its adoption | | Project | | | Commitlint | Checks if your commit messages meet the conventional commit format. | commitlint | NodeProject | ✅ | | Contributors | Adds github authors to the project's contributors list | shelljs-plugin-authors | NodeProject | ✅ | | CSpell | Provides spell checking for your code and your commit messages | cspell | NodeProject | ✅ | | EslintIgnore | Creates an ESLint ignore file containing the projen generated files | | TypeScriptProject | ✅ | | EslintJsdoc | Provides JSDoc specific linting rules for ESLint | eslint-plugin-jsdoc | TypeScriptProject | ✅ | | EslintJsonC | Provides linting of JSON files | eslint-plugin-jsonc | TypeScriptProject | ✅ | | EslintNoSecrets | Adds an eslint plugin to find strings that might be secrets/credentials | eslint-plugin-no-secrets | TypeScriptProject | ✅ | | EslintPrettierFixer | Ensures prettier is the last entry in your eslint extends section, which is needed for prettier to work correctly with eslint | | TypeScriptProject | ✅ | | EslintUnicorn | Provides more than 100 powerful ESLint rules | eslint-plugin-unicorn | TypeScriptProject | ✅ | | Husky | Git hooks made easy 🐶 woof! | husky | NodeProject | ✅ | | Recommended | Includes all the "included in recommended" components in this table | | TypeScriptProject | | | VscodeExtensionRecommendations | Manages vscode extension recommendations for your project | | Project | ✅ |

Pseudo-Components

Pseudo-Components behave like components but are created before the project. This is needed in situations where the project options are being generated.

| Pseudo-Component | Functionality | Base Project Type Required | | ----------- | ----------- | ----------- | | GitHubber | The GitHubber pseudo-component add github repo, issues and homepage URLs to your project | NodeProject | | NpmReleaser | The NpmReleaser pseudo-component add npm release data to the project | NodeProject | | Organisational | The Organisational pseudo-component add organisation based author data to the project | NodeProject |

Pseudo-Component Usage

Pseudo-Components are constructed and then added to the project using the addToProject() method

import { Organisational } from "@mountainpass/cool-bits-for-projen";
const organisational = new Organisational({
  organisation: {
    name: "Mountain Pass",
    email: "[email protected]",
    url: "https://mountain-pass.com.au",
  }
});
const project = new TypeScriptProject(
    ...organisational.nodeProjectOptions(),
    //...
)
// NOTE: The follow step is needed for Pseudo-Components, otherwise 
// their `preSynthesize()`, `synthesize()`, and `postSynthesize()` 
// methods will not be called
organisational.addToProject(project);