https://github.com/thekeineahnung/css-documenation-generator
css-documenation-generator is a tool that automatically generates documentation for CSS files based on the code in the css file.
https://github.com/thekeineahnung/css-documenation-generator
css documentation markdown nodejs typescript
Last synced: 2 months ago
JSON representation
css-documenation-generator is a tool that automatically generates documentation for CSS files based on the code in the css file.
- Host: GitHub
- URL: https://github.com/thekeineahnung/css-documenation-generator
- Owner: TheKeineAhnung
- License: other
- Created: 2022-04-09T20:25:23.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-27T15:20:26.000Z (almost 4 years ago)
- Last Synced: 2025-07-02T04:42:13.582Z (12 months ago)
- Topics: css, documentation, markdown, nodejs, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/css-documenation-generator
- Size: 189 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# css-documenation-generator
   [](https://github.com/prettier/prettier)
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](https://github.com/TheKeineAhnung/css-documenation-generator/blob/main/LICENSE.md) before using it.
## Prerequisites
This project requires NodeJS (version >= 14.0.0) and NPM. [NodeJS](https://nodejs.org/) and [NPM](https://www.npmjs.com/) are very easy to install. To make sure you have them available, you can try running the following command:
```
npm -v && node -v
```
## Installation
```
npm install css-documenation-generator
```
## Quick start
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](https://github.com/TheKeineAhnung/css-documenation-generator/blob/main/lib/types/StatusObject.ts) which contains the following properties:
```
status: Status
message?: string
```
You can find information about the `Status` type [here](https://github.com/TheKeineAhnung/css-documenation-generator/blob/main/lib/types/Status.ts)
### Commands
- `npm run dev`: Starts the TypeScript compiler in watch mode.
- `npm run build`: Starts the TypeScript compiler in build mode.
## Bug reports
Have you found a bug? Please open an [issue](https://github.com/TheKeineAhnung/css-documenation-generator/issues/new).
[cc-by-nc-sa]: http://creativecommons.org/licenses/by-nc-sa/4.0/
[cc-by-nc-sa-image]: https://licensebuttons.net/l/by-nc-sa/4.0/88x31.png
[cc-by-nc-sa-shield]: https://img.shields.io/badge/License-CC%20BY--NC--SA--4.0-yellow.svg?style=flat-square