SlimIO - Project Structure Policy. A policy aims to accurately describe the constituent elements of a project. This CLI has been created to apply the following Specification.
⚠️ This project has been created for SlimIO (it will not work outside). Feel free to replicate the idea / core concept.
- Node.js v12 or higher
- a SlimIO Manifest file at the root of the scanned project.
This package is available in the Node Package Repository and can be easily installed with npm or yarn.
$ npm i @slimio/psp
# or
$ yarn add @slimio/psp
When installed globally the psp executable will be exposed in your terminal.
$ psp
If you want to continue the execution even for critical warnings, just run with force mode:
$ psp --force
name | description |
---|---|
-h --help | Show help |
--force | Enable force mode |
--gitignore | Show .gitignore file |
--npmignore | Show .npmignore file |
--editorconfig | Show .editorconfig file |
PSP is available in API mode too.
const psp = require("@slimio/psp");
async function main() {
const { warn, crit } = await psp({
forceMode: true, // <-- stay to true (else it will exit the process on CRIT).
CWD: "./dir",
isCLI: false, // <-- stay to false (else it will work as it was executed as a CLI).
verbose: false
});
console.log(`warn => ${warn}, crit => ${crit}`);
}
main().catch(console.error);
The SlimIO Sync project allow to run a command to get a global overview of warnings of all projects in the current working dir.
Name | Refactoring | Security Risk | Usage |
---|---|---|---|
@slimio/is | Minor | Low | JavaScript Type checker |
@slimio/manifest | Minor | Low | SlimIO Manifest manager |
boxen | Minor | High | TBC |
estree-walker | Low | Simple utility for walking an ESTree-compliant AST | |
file-ignore-parser | Minor | Low | Parse .ignore file |
file-normalize | Low | File normalizer | |
globby | Minor | High | TBC |
js-yaml | Low | YAML parser/writer | |
kleur | Minor | Low | color for TTY |
make-promises-safe | Low | Force Node.js DEP00018 | |
marked | Minor | Low | TBC |
meriyah | Minor | Low | TBC |
sade | Minor | Low | Sade is a small but powerful tool for building command-line interface (CLI) applications for Node.js that are fast, responsive, and helpful! |
semver | Low | Semver parser/utilities for node |
MIT