Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@floydspace/projen-components

floydspace71Apache-2.01.0.0TypeScript support: included

A collection of cool projen components

cspell, eslint-jsdoc, eslint-unicorn, husky, prettier, projen, projen-component, projen-components, typescript, vscode-extension-recommendations

readme

@floydspace/projen-components

A collection of cool projen components

License npm npm downloads FOSSA Status

GitHub Actions Workflow Status GitHub issues GitHub pull requests codecov

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 @floydspace/projen-components to you development dependencies. e.g., in your .projenrc.ts

const project = new TypeScriptProject({
  //...
  devDeps: [
    //...
    "@floydspace/projen-components",
  ],
  //...
});

or

const project = new TypeScriptProject({
  //...
});
project.addDevDeps("@floydspace/projen-components");
  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 "@floydspace/projen-components";

//...

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

new Recommended(project);

//...

project.synth();

or you can add individual components

import { Husky, EslintUnicorn } from "@floydspace/projen-components";

//...

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
Changesets Adds Changesets to your project changesets NodeProject
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
OnlyAllow Only allow project package manager to be used only-allow 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 "@floydspace/projen-components";
const organisational = new Organisational({
  organisation: {
    name: "Mountain Pass",
    email: "info@mountain-pass.com.au",
    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);

changelog

@floydspace/projen-components

1.0.0

Major Changes

  • #25 840652f Thanks @floydspace! - deviating from original package version considering it as stable, and introduce a new Changesets component

Minor Changes

Patch Changes

1.0.0-next.18

Patch Changes

  • #23 7978b56 Thanks @godu! - do not use parallel flag to run pnpm task, instead use configurable workspace-concurrency option

1.0.0-next.17

Patch Changes

1.0.0-next.16

Patch Changes

1.0.0-next.15

Patch Changes

  • 1c46d59 Thanks @floydspace! - add fixed and linked options in Changesets component remove OnlyAllow component from PnpmMonorepo project

1.0.0-next.14

Minor Changes

  • 81f7675 Thanks @floydspace! - only allow pnpm by default; run projen with tsx; pnpm monorepo options

1.0.0-next.13

Patch Changes

  • 22cb3be Thanks @floydspace! - build workflow is optional in changesets; enforce pnpm in monorepo project

1.0.0-next.12

Minor Changes

1.0.0-next.11

Patch Changes

1.0.0-next.10

Patch Changes

1.0.0-next.9

Patch Changes

1.0.0-next.8

Patch Changes

1.0.0-next.7

Patch Changes

1.0.0-next.6

Patch Changes

1.0.0-next.5

Patch Changes

1.0.0-next.4

Patch Changes

1.0.0-next.3

Patch Changes

1.0.0-next.2

Patch Changes

1.0.0-next.1

Patch Changes

1.0.0-next.0

Major Changes

  • 840652f Thanks @floydspace! - deviating from original package version considering it as stable, and introduce a new Changesets component