SlimIO Tools

June 2, 2020 ยท View on GitHub

This documentation aims to describe all the tools we use on SlimIO. All the tools below have been developed by members of SlimIO. Please follow each repositories links if you want to understood in deep the role of each tools.

nametypedescription
SyncCLIPull, Update and track Node.js projects state (outdated, psp policies...)
Markdown-DependenciesCLICreate and/or Update the 'Dependencies' section in README.md of each projects.
GeneratorCLIGenerate a new SlimIO project (Addon, CLI, Service etc..)
Dependency-AnalyserCLI/ServiceDraw a network of all SlimIO Projects with their direct dependencies.
DevDocsCLIGenerate real-time dev-documentation for projects (it use jsdoc under the hood)
PSPCLICheck a given project files and structure against our internal policies.
ManifestPackageTo read/write/manage our manifest (slimio.toml) file.
SecurityServiceAnalyze and detect security issues in SlimIO repositories with Node-secure
RegistryServiceAddon registry (like npm but for SlimIO addons and modules)
StatusboardServiceOpen-source statusboard, online version for SlimIO available here.

Following packages are useful but not part of the SlimIO tools.

nametypedescription
Dep-updaterCLICLI to update the npm dependencies of a project for you
Publish-previewCLIPreview of properties and files that will be published on the NPM

Articles on our tools

Manifest

The manifest (the slimio.toml file at the root of each projects) is useful when we need to describe specific behaviors and settings in our internals tools or to our global product. Some examples are:

  • To create Addon archive the right way with the right parameters.
  • To the CLI to known the current addon dependencies (like npm).
  • To disable given psp warnings (like eslint when you disable a rule).
  • To configure and include the list of files we want for our Documentation tool.
  • To allow Sync to easily track and find information about our projects.

Some might bring the question of why creating a dedicated manifest. The answer is simple: We did not want to add more keys and complexity to the package.json and bring a clean concern separation.

Manifest example (from the Manifest project himself).

name = "Manifest"
version = "0.7.1"
type = "Package"

[doc]
include=['index.js']

SlimIO projects are described with many types (mainly for psp warnings). These types are described here. In the example below we can see that we ask our documentation tool to only consider and handle the index.js file.

Another example of manifest

name = "windrive"
version = "1.5.0"
platform = "Windows"
type = "NAPI"

N-API projects can target a given platform. It is rather useful for our tooling but also for later manage smarter archive mechanism.

Environment Variables

Most of our tooling are CLI that need access token for NPM and/or GITHUB. If you dont known how to find these tokens for both of these platforms, please follow these guides:

The next step is to create two Environment Variables GIT_TOKEN and NPM_TOKEN where the values are your tokens. If you dont known how to achieve that on your systems, these following guides may help you:

Cloning all SlimIO projects on your computer

โš ๏ธ Node.js and GIT must be installed on your system.

To clone all repositories you will need to download and set up Sync. Then prepare a proper SlimIO repository where all the SlimIO projects will be stored !

$ mkdir SlimIO
$ cd SlimIO

And then run the following psync command:

$ psync install --noinstall

The --noinstall avoid to install npm dependencies on all projects. In you want all projects to have their node_modules ready, then remove this argument.

๐Ÿ‘€ For more information please check the Sync documentation.