https://github.com/disqada/workspace
Generate both declarations and documentations with couple of clicks
https://github.com/disqada/workspace
d-ts docs jsdoc nodejs npm npm-package typedoc types
Last synced: about 2 months ago
JSON representation
Generate both declarations and documentations with couple of clicks
- Host: GitHub
- URL: https://github.com/disqada/workspace
- Owner: DisQada
- License: apache-2.0
- Created: 2023-11-11T14:12:45.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-22T06:31:02.000Z (over 2 years ago)
- Last Synced: 2024-04-25T19:02:03.484Z (about 2 years ago)
- Topics: d-ts, docs, jsdoc, nodejs, npm, npm-package, typedoc, types
- Language: JavaScript
- Homepage:
- Size: 416 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Workspace
## Badges
[](https://www.github.com/DisQada/Workspace)
[](https://www.npmjs.com/package/@disqada/workspace)


[](https://github.com/DisQada/Workspace/actions/workflows/test.yml)
[](https://github.com/semantic-release/semantic-release)
## Table of Contents
- [Workspace](#workspace)
- [Badges](#badges)
- [Table of Contents](#table-of-contents)
- [About](#about)
- [License](#license)
- [Getting Started](#getting-started)
- [Configurations](#configurations)
- [Usage](#usage)
- [Shell Command](#shell-command)
- [npm Scripts](#npm-scripts)
## About
This tool is used to generate both declarations and documentations with couple of clicks.
## License
Copyright © 2022 [DisQada](https://github.com/DisQada)
This framework is licensed under the [Apache License, Version 2.0](https://apache.org/licenses/LICENSE-2.0).
See the [LICENSE](LICENSE) file for more information.
# Getting Started
## Configurations
Add the file `workspace.json` to your project, below a table of all possible configurations that can be used.
| Property | Type | Default value | Description |
| -------- | ------ | ------------- | -------------------------------------- |
| root | string | src | Source code folder |
| types | string | types | Generate declarations into this folder |
| out | string | docs | Generate documentation this folder |
| npm | string | name | Project name in npm |
| github | string | Name | Project name in GitHub |
## Usage
### Shell Command
To call the package's functionality, use the `workspace` shell command, which accepts the following properties:
| Name | Type | required | description |
| ------------- | -------- | -------- | ---------------------------------------------------- |
| path | Argument | NO | configuration file path, default: "./workspace.json" |
| --no-config | Option | NO | Use it to not re-setup the configurations |
| --types OR -t | Option | NO | Emit declarations files |
| --docs OR -d | Option | NO | Emit documentations files |
### npm Scripts
Below are the recommended npm scripts:
> We recommend regenerating the types every time the docs are created to be sure that we're documenting the latest types
- `types`: Generates declarations after re-setting up configurations
- `docs`: runes `types` then generates documentations
```json
"scripts": {
"types": "workspace ./workspace.json -t",
"docs": "workspace ./workspace.json -t -d",
}
```
If you rarely change the configurations, you can make two script for each script to reduce the run time
```json
"scripts": {
"types": "workspace ./workspace.json -t --no-config",
"types:conf": "workspace ./workspace.json -t",
"docs": "workspace ./workspace.json -t -d --no-config",
"docs:conf": "workspace ./workspace.json -t -d",
}
```