Skip to content

Commit 9c32b2a

Browse files
remove unused files and update readme
1 parent 50fbd42 commit 9c32b2a

24 files changed

+94
-11359
lines changed

LICENSE

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright 2019 SoftwareBrothers.co
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

+79-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,83 @@
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
22

3+
Beautiful and simple documentation template for JSDoc 3.
34

4-
## Generating Typeface Fonts
5+
## Installation
56

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+
```
710

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).

gulpfile.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
const { spawn } = require('child_process')
1+
const DOCS_COMMAND = process.env.DOCS_COMMAND || 'npm run docs'
2+
const DOCS_OUTPUT = process.env.DOCS_OUTPUT || "../docs"
3+
4+
25
const gulp = require('gulp')
36
const sass = require('gulp-sass')
47
const autoprefixer = require('gulp-autoprefixer')
58
const run = require('gulp-run')
69
const babel = require('gulp-babel')
710
const uglify = require('gulp-uglify')
811
const rename = require('gulp-rename')
9-
const nodemon = require('gulp-nodemon')
1012
const concat = require('gulp-concat')
1113
const path = require('path')
1214
const browserSync = require('browser-sync').create();
@@ -33,7 +35,7 @@ gulp.task('js', () => {
3335
})
3436

3537
gulp.task('docs', function() {
36-
return run('cd .. && npm run docs').exec()
38+
return run(`cd .. && ${DOCS_COMMAND}`).exec()
3739
})
3840

3941
gulp.task('watch', () => {
@@ -45,10 +47,10 @@ gulp.task('watch', () => {
4547
gulp.task('sync', () => {
4648
browserSync.init({
4749
server: {
48-
baseDir: "../docs"
50+
baseDir: DOCS_OUTPUT
4951
}
5052
})
51-
gulp.watch("../docs/*").on('change', browserSync.reload)
53+
gulp.watch(`${DOCS_OUTPUT}/*`).on('change', browserSync.reload)
5254
})
5355

5456
gulp.task('default', ['sass', 'js', 'docs', 'watch', 'sync'])

output/cd

Whitespace-only changes.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "JSdoc theme",
55
"main": "publish.js",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"gulp": "./node_modules/.bin/gulp"
88
},
99
"author": "Wojciech Krysiak",
1010
"license": "MIT",
-19.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)