Skip to content

Commit

Permalink
📚 docs: Upgrade.
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed Apr 27, 2020
1 parent 63f3762 commit ccc4423
Show file tree
Hide file tree
Showing 8 changed files with 179 additions and 2 deletions.
47 changes: 47 additions & 0 deletions .esdoc.json
@@ -0,0 +1,47 @@
{
"source": "./src",
"destination": "./gh-pages",
"debug": false,
"index": "./README.md",
"package": "./package.json",
"plugins": [
{
"name": "esdoc-standard-plugin",
"option": {
"accessor": {
"access": ["public", "protected", "private"],
"autoPrivate": true
},
"brand": {
"title": "@aureooms/js-compare"
},
"test": {
"type": "ava",
"source": "./test/src"
},
"manual": {
"files":[
"./doc/manual/overview.md",
"./doc/manual/installation.md",
"./doc/manual/usage.md",
"./doc/manual/example.md"
]
}
}
},
{
"name": "esdoc-inject-style-plugin",
"option": {
"enable": true,
"styles": ["./doc/css/style.css"]
}
},
{
"name": "esdoc-inject-script-plugin",
"option": {
"enable": true,
"scripts": ["./doc/scripts/header.js"]
}
}
]
}
52 changes: 52 additions & 0 deletions doc/css/style.css
@@ -0,0 +1,52 @@
h1,
h2,
.navigation,
.layout-container > header,
footer
{{
border: none;
}}

.project-name {{
color: #FC913A;
font-weight: bold;
}}

.layout-container > header > a.repo-url-github {{
font-size: inherit;
display: inline;
background: none;
vertical-align: inherit;
}}

.search-box img {{
display: none;
}}

.search-box::before{{
content: "search";
}}

.search-input-edge {{
height: 0px;
}}

.search-result {{
width: 300px;
margin-left: 42px;
box-shadow: 1px 1px 13px rgba(0,0,0,0.2);
}}

.search-input {{
visibility: visible;
}}

.search-result li.search-separator {{
text-transform: capitalize;
background-color: #ccc;
}}

span[data-ice="signature"] > span {{
/*font-weight: bold;*/
font-style: italic;
}}
3 changes: 3 additions & 0 deletions doc/manual/example.md
@@ -0,0 +1,3 @@
# Examples

> More examples in [the test files](https://github.com/{repository}/tree/master/test/src).
22 changes: 22 additions & 0 deletions doc/manual/installation.md
@@ -0,0 +1,22 @@
# Installation

Can be managed using
[yarn](https://yarnpkg.com/en/docs),
[npm](https://docs.npmjs.com),
or [jspm](https://jspm.org/docs).


### yarn
```terminal
yarn add {fullname}
```

### npm
```terminal
npm install {fullname} --save
```

### jspm
```terminal
jspm install npm:{fullname}
```
1 change: 1 addition & 0 deletions doc/manual/overview.md
@@ -0,0 +1 @@
# Overview
18 changes: 18 additions & 0 deletions doc/manual/usage.md
@@ -0,0 +1,18 @@
# Usage

> :warning: The code needs a ES2015+ polyfill to run (`regeneratorRuntime`),
> for instance [@babel/polyfill](https://babeljs.io/docs/usage/polyfill).
First, require the polyfill at the entry point of your application
```js
require( '@babel/polyfill' ) ;
// or
import '@babel/polyfill' ;
```

Then, import the library where needed
```js
const {var} = require( '{fullname}' ) ;
// or
import * as {var} from '{fullname}' ;
```
34 changes: 34 additions & 0 deletions doc/scripts/header.js
@@ -0,0 +1,34 @@
var domReady = function(callback) {{
var state = document.readyState ;
if ( state === 'interactive' || state === 'complete' ) {{
callback() ;
}}
else {{
document.addEventListener('DOMContentLoaded', callback);
}}
}} ;


domReady(function(){{

var projectname = document.createElement('a');
projectname.classList.add('project-name');
projectname.text = '{repository}';
projectname.href = './index.html' ;

var header = document.getElementsByTagName('header')[0] ;
header.insertBefore(projectname,header.firstChild);

var testlink = document.querySelector('header > a[data-ice="testLink"]') ;
testlink.href = 'https://coveralls.io/github/{repository}' ;
testlink.target = '_BLANK' ;

var searchBox = document.querySelector('.search-box');
var input = document.querySelector('.search-input');

// active search box when focus on searchBox.
input.addEventListener('focus', function(){{
searchBox.classList.add('active');
}});

}});
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -6,9 +6,9 @@
},
"license": "AGPL-3.0",
"scripts": {
"doc": "./node_modules/.bin/groc",
"build": "./node_modules/.bin/aureooms-node-package-build",
"test": "./node_modules/.bin/aureooms-node-package-test"
"test": "./node_modules/.bin/aureooms-node-package-test",
"esdoc": "esdoc"
},
"devDependencies": {
"aureooms-node-package": "^5.0.2",
Expand Down

0 comments on commit ccc4423

Please sign in to comment.