0.2.8 • Published 1 year ago

@mountainpass/cool-bits-for-projen v0.2.8

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

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

ComponentFunctionalityUsesBase Project Type RequiredIncluded in Recommended
CodeOfConductAdd 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
CommitlintChecks if your commit messages meet the conventional commit format.commitlintNodeProject
ContributorsAdds github authors to the project's contributors listshelljs-plugin-authorsNodeProject
CSpellProvides spell checking for your code and your commit messagescspellNodeProject
EslintIgnoreCreates an ESLint ignore file containing the projen generated filesTypeScriptProject
EslintJsdocProvides JSDoc specific linting rules for ESLinteslint-plugin-jsdocTypeScriptProject
EslintJsonCProvides linting of JSON fileseslint-plugin-jsoncTypeScriptProject
EslintNoSecretsAdds an eslint plugin to find strings that might be secrets/credentialseslint-plugin-no-secretsTypeScriptProject
EslintPrettierFixerEnsures prettier is the last entry in your eslint extends section, which is needed for prettier to work correctly with eslintTypeScriptProject
EslintUnicornProvides more than 100 powerful ESLint ruleseslint-plugin-unicornTypeScriptProject
HuskyGit hooks made easy 🐶 woof!huskyNodeProject
RecommendedIncludes all the "included in recommended" components in this tableTypeScriptProject
VscodeExtensionRecommendationsManages vscode extension recommendations for your projectProject

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-ComponentFunctionalityBase Project Type Required
GitHubberThe GitHubber pseudo-component add github repo, issues and homepage URLs to your projectNodeProject
NpmReleaserThe NpmReleaser pseudo-component add npm release data to the projectNodeProject
OrganisationalThe Organisational pseudo-component add organisation based author data to the projectNodeProject

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: "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);
0.2.7

1 year ago

0.2.6

1 year ago

0.2.8

1 year ago

0.2.5

1 year ago

0.2.1

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.4

2 years ago

0.2.0

2 years ago

0.1.12

2 years ago

0.1.11

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago