|
1 |
| -The default template for JSDoc 3 uses: [the Taffy Database library](http://taffydb.com/) and the [Underscore Template library](http://underscorejs.org/). |
| 1 | +# BetterDocs |
2 | 2 |
|
| 3 | +Beautiful and simple documentation template for JSDoc 3. |
3 | 4 |
|
4 |
| -## Generating Typeface Fonts |
| 5 | +## Installation |
5 | 6 |
|
6 |
| -The default template uses the [OpenSans](https://www.google.com/fonts/specimen/Open+Sans) typeface. The font files can be regenerated as follows: |
| 7 | +```sh |
| 8 | +npm install --save-dev better-docs |
| 9 | +``` |
7 | 10 |
|
8 |
| -1. Open the [OpenSans page at Font Squirrel](<http://www.fontsquirrel.com/fonts/open-sans>). |
9 |
| -2. Click on the 'Webfont Kit' tab. |
10 |
| -3. Either leave the subset drop-down as 'Western Latin (Default)', or, if we decide we need more glyphs, than change it to 'No Subsetting'. |
11 |
| -4. Click the 'DOWNLOAD @FONT-FACE KIT' button. |
12 |
| -5. For each typeface variant we plan to use, copy the 'eot', 'svg' and 'woff' files into the 'templates/default/static/fonts' directory. |
| 11 | +## Usage |
| 12 | + |
| 13 | +### With command line |
| 14 | + |
| 15 | +Assuming that you have jsdoc installed globally: |
| 16 | + |
| 17 | +``` |
| 18 | +jsdoc your-documented-file.js -t ./node_modules/better-docs |
| 19 | +``` |
| 20 | + |
| 21 | +### With npm and configuration file |
| 22 | + |
| 23 | +In your projects package.json file add a new script: |
| 24 | + |
| 25 | +``` |
| 26 | +"script": { |
| 27 | + "docs": "node_modules/.bin/jsdoc -c jsdoc.json" |
| 28 | +} |
| 29 | +``` |
| 30 | + |
| 31 | +in your `jsdoc.json` file, set the template: |
| 32 | + |
| 33 | +"opts": { |
| 34 | + "template": "node_modules/better-docs" |
| 35 | +} |
| 36 | + |
| 37 | +## Setting up for the development |
| 38 | + |
| 39 | +If you want to change the theam locally follow the steps: |
| 40 | + |
| 41 | +1. Clone the repo to the folder where you have the project: |
| 42 | + |
| 43 | +``` |
| 44 | +cd your-project |
| 45 | +git clone [email protected]:SoftwareBrothers/better-docs.git |
| 46 | +``` |
| 47 | + |
| 48 | +or add it as a git submodule: |
| 49 | + |
| 50 | +``` |
| 51 | +git submodule add [email protected]:SoftwareBrothers/better-docs.git |
| 52 | +``` |
| 53 | + |
| 54 | +2. Install the packages |
| 55 | + |
| 56 | +``` |
| 57 | +npm install |
| 58 | +
|
| 59 | +# or |
| 60 | +
|
| 61 | +yarn |
| 62 | +``` |
| 63 | + |
| 64 | +3. Within the better-docs folder run the gulp script. It will regenerate documentation everytime you change something. |
| 65 | + |
| 66 | +``` |
| 67 | +cd better-docs |
| 68 | +DOCS_COMMAND='npm run docs' DOCS_OUTPUT='../docs' cd better-docs && gulp |
| 69 | +``` |
| 70 | + |
| 71 | +## License |
| 72 | + |
| 73 | +BetterDocs is Copyright © 2019 SoftwareBrothers.co. It is free software and may be redistributed under the terms specified in the [LICENSE](LICENSE) file. |
| 74 | + |
| 75 | +## About SoftwareBrothers.co |
| 76 | + |
| 77 | +<img src="https://softwarebrothers.co/assets/images/software-brothers-logo-full.svg" width=240> |
| 78 | + |
| 79 | + |
| 80 | +We’re an open, friendly team that helps clients from all over the world to transform their businesses and create astonishing products. |
| 81 | + |
| 82 | +* We are available to [hire](https://softwarebrothers.co/contact). |
| 83 | +* If you want to work for us - check out the [career page](https://softwarebrothers.co/career). |
0 commit comments