css-documenation-generator is a tool that automatically generates documentation for CSS files based on the code in the css file. It is written in TypeScript. Please take a look to the licence before using it.
This project requires NodeJS (version >= 14.0.0) and NPM. NodeJS and NPM are very easy to install. To make sure you have them available, you can try running the following command:
npm -v && node -v
npm install css-documenation-generator
After installation you can import the package with in your JavaScript or TypeScript file:
import { generateCssDocs } from 'css-documenation-generator/build/lib/cssDocumentationGenerator';
To generate the documentation you can use the following function:
generateCssDocs(inputPaths: string[], outputPath: string)
The inputPaths parameter is an array of paths to the CSS files you want to generate the documentation for. The outputPath parameter is the path to the directory where the documentation will be saved. Both need to be absolute paths.
The function returns a StatusObject which contains the following properties:
status: Status
message?: string
You can find information about the Status
type here
npm run dev
: Starts the TypeScript compiler in watch mode.npm run build
: Starts the TypeScript compiler in build mode.
Have you found a bug? Please open an issue.