Skip to content

Commit fd3c096

Browse files
📚 docs: Upgrade.
1 parent a4249ed commit fd3c096

File tree

8 files changed

+178
-1
lines changed

8 files changed

+178
-1
lines changed

.esdoc.json

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"source": "./src",
3+
"destination": "./gh-pages",
4+
"debug": false,
5+
"index": "./README.md",
6+
"package": "./package.json",
7+
"plugins": [
8+
{
9+
"name": "esdoc-standard-plugin",
10+
"option": {
11+
"accessor": {
12+
"access": ["public", "protected", "private"],
13+
"autoPrivate": true
14+
},
15+
"brand": {
16+
"title": "@aureooms/js-dll"
17+
},
18+
"test": {
19+
"type": "ava",
20+
"source": "./test/src"
21+
},
22+
"manual": {
23+
"files":[
24+
"./doc/manual/overview.md",
25+
"./doc/manual/installation.md",
26+
"./doc/manual/usage.md",
27+
"./doc/manual/example.md"
28+
]
29+
}
30+
}
31+
},
32+
{
33+
"name": "esdoc-inject-style-plugin",
34+
"option": {
35+
"enable": true,
36+
"styles": ["./doc/css/style.css"]
37+
}
38+
},
39+
{
40+
"name": "esdoc-inject-script-plugin",
41+
"option": {
42+
"enable": true,
43+
"scripts": ["./doc/scripts/header.js"]
44+
}
45+
}
46+
]
47+
}

doc/css/style.css

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
h1,
2+
h2,
3+
.navigation,
4+
.layout-container > header,
5+
footer
6+
{
7+
border: none;
8+
}
9+
10+
.project-name {
11+
color: #FC913A;
12+
font-weight: bold;
13+
}
14+
15+
.layout-container > header > a.repo-url-github {
16+
font-size: inherit;
17+
display: inline;
18+
background: none;
19+
vertical-align: inherit;
20+
}
21+
22+
.search-box img {
23+
display: none;
24+
}
25+
26+
.search-box::before{
27+
content: "search";
28+
}
29+
30+
.search-input-edge {
31+
height: 0px;
32+
}
33+
34+
.search-result {
35+
width: 300px;
36+
margin-left: 42px;
37+
box-shadow: 1px 1px 13px rgba(0,0,0,0.2);
38+
}
39+
40+
.search-input {
41+
visibility: visible;
42+
}
43+
44+
.search-result li.search-separator {
45+
text-transform: capitalize;
46+
background-color: #ccc;
47+
}
48+
49+
span[data-ice="signature"] > span {
50+
/*font-weight: bold;*/
51+
font-style: italic;
52+
}

doc/manual/example.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Examples
2+
3+
> More examples in [the test files](https://github.com/aureooms/js-dll/tree/master/test/src).

doc/manual/installation.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Installation
2+
3+
Can be managed using
4+
[yarn](https://yarnpkg.com/en/docs),
5+
[npm](https://docs.npmjs.com),
6+
or [jspm](https://jspm.org/docs).
7+
8+
9+
### yarn
10+
```terminal
11+
yarn add @aureooms/js-dll
12+
```
13+
14+
### npm
15+
```terminal
16+
npm install @aureooms/js-dll --save
17+
```
18+
19+
### jspm
20+
```terminal
21+
jspm install npm:@aureooms/js-dll
22+
```

doc/manual/overview.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Overview

doc/manual/usage.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Usage
2+
3+
> :warning: The code needs a ES2015+ polyfill to run (`regeneratorRuntime`),
4+
> for instance [@babel/polyfill](https://babeljs.io/docs/usage/polyfill).
5+
6+
First, require the polyfill at the entry point of your application
7+
```js
8+
require( '@babel/polyfill' ) ;
9+
// or
10+
import '@babel/polyfill' ;
11+
```
12+
13+
Then, import the library where needed
14+
```js
15+
const dll = require( '@aureooms/js-dll' ) ;
16+
// or
17+
import * as dll from '@aureooms/js-dll' ;
18+
```

doc/scripts/header.js

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
var domReady = function(callback) {
2+
var state = document.readyState ;
3+
if ( state === 'interactive' || state === 'complete' ) {
4+
callback() ;
5+
}
6+
else {
7+
document.addEventListener('DOMContentLoaded', callback);
8+
}
9+
} ;
10+
11+
12+
domReady(function(){
13+
14+
var projectname = document.createElement('a');
15+
projectname.classList.add('project-name');
16+
projectname.text = 'aureooms/js-dll';
17+
projectname.href = './index.html' ;
18+
19+
var header = document.getElementsByTagName('header')[0] ;
20+
header.insertBefore(projectname,header.firstChild);
21+
22+
var testlink = document.querySelector('header > a[data-ice="testLink"]') ;
23+
testlink.href = 'https://coveralls.io/github/aureooms/js-dll' ;
24+
testlink.target = '_BLANK' ;
25+
26+
var searchBox = document.querySelector('.search-box');
27+
var input = document.querySelector('.search-input');
28+
29+
// active search box when focus on searchBox.
30+
input.addEventListener('focus', function(){
31+
searchBox.classList.add('active');
32+
});
33+
34+
});

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"scripts": {
2626
"build": "./node_modules/.bin/aureooms-node-package-build",
2727
"test": "./node_modules/.bin/aureooms-node-package-test",
28-
"doc": "./node_modules/.bin/groc"
28+
"esdoc": "esdoc"
2929
},
3030
"author": "aureooms",
3131
"devDependencies": {

0 commit comments

Comments
 (0)