Skip to content

Latest commit

 

History

History
2073 lines (1674 loc) · 81.8 KB

CONFDOCS.md

File metadata and controls

2073 lines (1674 loc) · 81.8 KB

Codebase Configuration Documentation

Documents configuration tasks managed by robo-config.

Manage AWS Lambda docker runner for project.

Targets Requires

Manage docker test configuration for serverless project.

Targets Requires

Updating manage.sh using overwrite.

  • Spawn docker container for serverless testing and deploying.
Targets Requires

Updating docker/Dockerfile using overwrite.

  • Docker environment definition for running tests in AWS Lambda container.
Targets Requires

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

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

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

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

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

Container Platform.

Docker is a computer program that performs operating-system-level virtualization. Makes it for example possible to easily create and tear down complex test setups.

Serverless Framework.

The Serverless Framework is a free and open-source web framework that was developed for building serverless applications.

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

🔺 docker

🔹 other

Prepare project to run tests.

File starts docker container(s) with necessary setup to execute the project tests.

🔺 docker

🔹 other

Main docker container configuration file.

Contains instructions for the main docker container this repository uses for testing.

🔺 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.