0.1.0 • Published 1 year ago

@rapidapp/scanner v0.1.0

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

@rapidapp/scanner

A simple scan the technologies used in a TypeScript/JavaScript project

Install

npm install ora

Usage

import { generateReport } from '@rapidapp/scanner'
import { scanFolder } from '@rapidapp/scanner/helpers'

const files = await scanFolder(process.cwd())

const report = await generateReport(files)

API

generateReport(files, config)

files

Type: string[]

The files that belong to the project can be obtained using scanFolder to get the project files.

config (optional)

Type: object

Scanned project path

config.root

Type: string\ Default: process.cwd()

config.checkContent (optional)

Type: boolean (optional)\ Default: false

Check the contents of the files to determine each configuration

config.checkDependencies (optional)

Type: boolean (optional)\ Default: true

Check if it is listed as a dependency in the package.json

scanFolder(root)

root

Type: string

Path where it will start searching for all files

CLI

Installation

npm i -g rapidapp

Usage

rapidapp scan <project-directory>

Output

[
  "name": "project-name",
  "packages": [
    {
      "name": "package-name",
      "languages": ["typescript","javascript"],
      "linters": ["eslint"],
      "formatter": ["prettier"]
    }
  ],
  "languages": ["typescript","javascript"],
  "package_manager": "pnpm",
  "linters": ["biome"],
  "formatter": ["biome"]
]

License

Mozilla Public License Version 2.0

0.1.0

1 year ago