Skip to content

Latest commit

ย 

History

History
1918 lines (1549 loc) ยท 75.9 KB

CONFDOCS.md

File metadata and controls

1918 lines (1549 loc) ยท 75.9 KB

Codebase Configuration Documentation

Documents configuration tasks managed by robo-config.

Manage various configuration files for an open source npm package on github.

Targets Requires Variables

Manage basic project structure for npm package on github.

Targets Requires Variables

Updating gardener.js using overwrite.

  • Manage gardener.js file for js-gardener.
Targets Requires

Manage basic project structure for npm package on github.

Targets Requires Variables

Updating test/reg.js using overwrite.

  • Create register file.
Targets Requires
    project
    โ””โ”€ย test
    ย ย ย โ””โ”€ย reg.js

Updating test/hot.js using overwrite.

  • Create loader file.
Targets Requires
    project
    โ””โ”€ย test
    ย ย ย โ””โ”€ย hot.js

Updating README.md using create-only.

  • Create README.md template file.
Targets Variables

Updating .mocharc.yml using create-only.

  • Create options file for mocha tests.
Targets Requires

Updating test/index.spec.js using create-only.

  • Create package template index.spec.js test file.
Targets Requires
    project
    โ””โ”€ย test
    ย ย ย โ””โ”€ย index.spec.js

Updating src/index.js using create-only.

  • Create package template index.js file.
Targets Requires
    project
    โ””โ”€ย src
    ย ย ย โ””โ”€ย index.js

Updating .eslintrc.json using overwrite.

  • Create configuration file for eslint enforcing opinionated, best practices.
Targets Requires

Updating eslint.config.js using overwrite.

  • Create configuration file for eslint enforcing opinionated, best practices.
Targets Requires

Manage semantic-release configuration for npm package on github.

Targets Requires

Updating .releaserc.json using overwrite.

Targets Requires

Manage package.json for npm package on github.

Targets Requires Variables

Updating package.json using merge-shallow.

  • Set various entries.
Targets Requires Variables

Updating package.json using merge-deep.

  • Set various entries.
Targets Requires Variables

Updating package.json using default-shallow.

  • Set defaults for various entries.
Targets Requires

Updating package.json using default-deep.

  • Set defaults for various entries.
Targets Requires

Manage npm configuration for npm package on github.

Targets Requires
๐Ÿ“‹ npm/npmignore (index)

Updating .npmignore using unique-top.

  • Inject comment into .npmignore explaining when to use it.
Targets Requires

Manage license configuration for open source project.

Targets Requires Variables

Updating package.json using merge-shallow.

  • Link MIT license file into npm configuration.
Targets Requires Variables

Updating LICENSE using overwrite.

Targets Variables
    project
    โ””โ”€ย LICENSE

Manage WebStorm configuration.

Targets Requires Variables

Updating .idea/${projectName}.iml (if exists) using xml-merge.

  • Mark coverage Folder as excluded in Jetbrains.
Targets Requires Variables

Manage gitignore configuration for npm package on github.

Targets Requires

Updating .gitignore using unique-top.

  • Inject recommended entries into gitignore file.
  • Default ignores for JetBrains IDE.
  • Default ignores for OSX
  • Default ignores for NodeJs
Targets Requires

Manage gally configuration for npm package on github.

Targets Requires Variables

Updating .gally.json using overwrite.

  • Restrictive two-branch config.
Targets Requires Variables

Manage editor configuration for project.

Targets

Updating .editorconfig using overwrite.

  • Two space line indentation.
  • Set lf line endings.
  • Set utf8 encoding.
  • Remove unnecessary whitespaces.
Targets

Manage dependabot configuration for npm package on github.

Targets Requires
    project
    โ””โ”€ย .dependabot
    ย ย ย โ””โ”€ย config.yml

Updating .dependabot/config.yml using overwrite.

  • Configure dependabot to instantly merge javascript dependency updates into the dev branch.
Targets Requires
    project
    โ””โ”€ย .dependabot
    ย ย ย โ””โ”€ย config.yml

Manage circleci configuration for npm package on github.

Targets Requires
    project
    โ””โ”€ย .circleci
    ย ย ย โ””โ”€ย config.yml

Updating .circleci/config.yml using overwrite.

  • Restrictive two-branch circleci config.
Targets Requires
    project
    โ””โ”€ย .circleci
    ย ย ย โ””โ”€ย config.yml

๐Ÿ“‚ c8/#default (index)

Manage .c8rc.json for c8 coverage testing.

Targets Requires

Updating .c8rc.json using merge-shallow.

  • Set various entries.
Targets Requires

Updating .c8rc.json using merge-deep.

  • Set various entries.
Targets Requires

Updating .c8rc.json using default-shallow.

  • Set defaults for various entries.
Targets Requires

Updating .c8rc.json using default-deep.

  • Set defaults for various entries.
Targets Requires

Add badged for npm open source package on github.

Targets Requires Variables

Updating README.md using merge-below-title.

Targets Requires Variables

Updating README.md using merge-below-title.

Targets Requires Variables

Updating README.md using merge-below-title.

Targets Requires Variables

Requires

Programming Language.

JavaScript, often abbreviated as JS, is a high-level, interpreted programming language that conforms to the ECMAScript specification. It is characterized as dynamic, weakly typed, prototype-based and multi-paradigm.

NodeJs Project Management.

Enforces and helps setting up best practices around NodeJs projects. Enforces highest code quality and minimizes package setup and maintenance complexity - so you can focus on writing code. Highly recommended if you are getting started with a new package and extremely useful if you are maintaining multiple packages.

JavaScript test framework.

Mocha is a JavaScript test framework for Node.js programs, featuring browser support, asynchronous testing, test coverage reports, and use of any assertion library.

JavaScript assertion library.

Chai is a BDD / TDD assertion library for node and the browser that can be paired with any javascript testing framework.

Linting for JavaScript.

JSLint is a static code analysis tool used in software development for checking if JavaScript source code complies with coding rules.

Automates npm package release workflow.

Automates the package release workflow including:

  • determining the next version number
  • generating the release notes
  • publishing the package

Javascript package repository.

Requires the project to be conform with the npm standard, i.e. contain a package.json file. Does not require the project to be published to npm.

Javascript package repository published.

Requires the project to be published to npm either as a private or public package.

Collection of various IDEs.

Collection of various IDEs. There exists one for every major programming language and they are all very similar (i.e. shortcuts, layout), which makes them great when switching languages.

Coverage testing for javascript projects.

A major coverage testing framework for javascript. Comes with all the bells and whistles.

Version control system.

The most used version control system. Not to be confused with github (which uses git).

Run automated jobs using docker containers.

Allows set up for ci/cd using docker containers. Automates development process quickly, safely, and at scale.

Automation around github.com Repository Management

Allows management of github.com repositories through configuration. Very powerful when you need to synchronize settings across multiple repositories.

Major development platform powered by git.

GitHub is a code hosting platform for collaboration and version control. Lets you and others work together on projects.

Automatic dependency updates.

Makes dependency updates very easy by automatically creating pull requests in your repo. All major programming languages are supported or work is done towards supporting them.

Dependency management similar to npm.

Very similar functionality to npm cli.


Variables

packageName : string

Name of the package on npm.

The name of the project as published to npm. Note that for scoped packages the name can differ significantly from the repo name.

nccExclude : array

Default: ``

Exclude packages from ncc compilation.

nccEnabled : boolean

Enable ncc for service.

Uses NCC to compile service. Please ensure that the service still works after ncc compilation.

nodeVersion : string

The minimum node version targeted.

The minimum nodejs version that the project targets.

repoKey : string

Repository key.

The repository key contains the owner or organization of the project and the repository name itself, separated by a slash.

ownerName : string

Name of the owner of this project.

The owner name of the project is the name of the person or organization publishing the project under their license.

projectName : string

Name of the project.

The project name is in most cases identical to the repository name.

owner : string

The owner of the code on github.

The code owner is the gatekeeper of the project, ultimately responsible for all changes.

mergeBot : string

The github name of the bot used for automatic merging.


Targets

๐Ÿ”บ js-gardener, javascript

๐Ÿ”น other

Runner for js-gardener.

Execute all configured js-gardener tasks.

๐Ÿ”น other

Registration hook to load custom loader.

๐Ÿ”น other

Loader to allow hot reloading of files for testing.

๐Ÿ”น nostruct

Project readme file.

Contains lots of information about the project itself.

๐Ÿ”บ mocha, javascript

๐Ÿ”น list

Mocha test configuration file.

๐Ÿ”บ javascript

๐Ÿ”น other

Main project test file.

Main test file for the project. At the very least tests signature of what is exposed.

๐Ÿ”บ javascript

๐Ÿ”น other

Main project file.

Main file for the project. Exposes functionality for libraries.

๐Ÿ”บ eslint

๐Ÿ”น json

Configuration file for eslint.

๐Ÿ”บ eslint

๐Ÿ”น nostruct

Configuration file for eslint.

๐Ÿ”บ semantic-release

๐Ÿ”น json

Configuration for semantic-release.

Configuration file for semantic-release and plugins

๐Ÿ”บ npm

๐Ÿ”น json

Configuration for npm package.

๐Ÿ”บ npm, npm-published

๐Ÿ”น list

Config to exclude files from npm package.

Note that this file is mostly not required. Use whitelisting instead. See here for more information.

๐Ÿ”น nostruct

Project License file.

Specify the license the project is published under. Can be set to unlicensed as well.

๐Ÿ”บ jetbrains

๐Ÿ”น xml

Module Library configuration file for JetBrains IDE.

๐Ÿ”บ git

๐Ÿ”น list

Exclude files from being tracked.

Specifies files intentionally untracked by git.

๐Ÿ”บ gally, github

๐Ÿ”น json

Configuration file for gally.

Includes detailed configuration for github project structure.

๐Ÿ”น other

Defines file formatting.

Defines file formatting that an IDE can pick up and use to format project files.

๐Ÿ”บ dependabot

๐Ÿ”น yml

Configuration file for dependabot.

๐Ÿ”บ circleci

๐Ÿ”น yml

Configuration file for circleci.

๐Ÿ”บ c8

๐Ÿ”น json

Configuration for c8 package.


Strategies

๐Ÿ”น any

Simply replace the old with the new content.

๐Ÿ”น any

Does nothing when the file is already present, otherwise creates it.

๐Ÿ”น json, yml

Does a shallow merge aka Object.assign().

Useful when specific keys of the target need to be overwritten.

๐Ÿ”น json, yml

Does a "smart" deep merge.

This will not work as desired for all object deep merging, but should for many cases.

๐Ÿ”น json, yml

Similar to merge-shallow, but keeps existing values instead of overwriting.

Useful to ensure specific keys of the target are present without overwriting existing content.

๐Ÿ”น json, yml

Similar to merge-deep, but keeps existing values instead of overwriting.

Useful to ensure specific keys of the target are present without overwriting existing content.

๐Ÿ”น list

Merges content at the top of the file and removes existing, duplicate lines.

Useful for managing e.g. .gitignore when the original content should be kept.

๐Ÿ”น xml

Does a "smart" deep merge.

This will not work as desired for all xml merging, but should for many cases.

๐Ÿ”น list, nostruct

Merges content below title.