Skip to content

Commit 99033bd

Browse files
$ js new
1 parent 6ffc8fb commit 99033bd

14 files changed

+398
-102
lines changed

.codacy.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
languages:
2+
JavaScript: true
3+
exclude_paths:
4+
- "doc/**"
5+
- "lib/**"
6+
- "test/**"

.codeclimate.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
languages:
2+
JavaScript: true
3+
exclude_paths:
4+
- "doc/**"
5+
- "lib/**"
6+
- "test/**"

.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-skip-list"
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+
}

.gitignore

+12-100
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,16 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
lerna-debug.log*
1+
# lock file
2+
!yarn.lock
83

9-
# Diagnostic reports (https://nodejs.org/api/report.html)
10-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
4+
# Generated files
5+
/lib
116

12-
# Runtime data
13-
pids
14-
*.pid
15-
*.seed
16-
*.pid.lock
7+
# Dependency directory
8+
node_modules
9+
jspm_packages
1710

18-
# Directory for instrumented libs generated by jscoverage/JSCover
19-
lib-cov
11+
# Coverage directory used by nyc
12+
/coverage
13+
/.nyc_output
2014

21-
# Coverage directory used by tools like istanbul
22-
coverage
23-
*.lcov
24-
25-
# nyc test coverage
26-
.nyc_output
27-
28-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29-
.grunt
30-
31-
# Bower dependency directory (https://bower.io/)
32-
bower_components
33-
34-
# node-waf configuration
35-
.lock-wscript
36-
37-
# Compiled binary addons (https://nodejs.org/api/addons.html)
38-
build/Release
39-
40-
# Dependency directories
41-
node_modules/
42-
jspm_packages/
43-
44-
# TypeScript v1 declaration files
45-
typings/
46-
47-
# TypeScript cache
48-
*.tsbuildinfo
49-
50-
# Optional npm cache directory
51-
.npm
52-
53-
# Optional eslint cache
54-
.eslintcache
55-
56-
# Microbundle cache
57-
.rpt2_cache/
58-
.rts2_cache_cjs/
59-
.rts2_cache_es/
60-
.rts2_cache_umd/
61-
62-
# Optional REPL history
63-
.node_repl_history
64-
65-
# Output of 'npm pack'
66-
*.tgz
67-
68-
# Yarn Integrity file
69-
.yarn-integrity
70-
71-
# dotenv environment variables file
72-
.env
73-
.env.test
74-
75-
# parcel-bundler cache (https://parceljs.org/)
76-
.cache
77-
78-
# Next.js build output
79-
.next
80-
81-
# Nuxt.js build / generate output
82-
.nuxt
83-
dist
84-
85-
# Gatsby files
86-
.cache/
87-
# Comment in the public line in if your project uses Gatsby and *not* Next.js
88-
# https://nextjs.org/blog/next-9-1#public-directory-support
89-
# public
90-
91-
# vuepress build output
92-
.vuepress/dist
93-
94-
# Serverless directories
95-
.serverless/
96-
97-
# FuseBox cache
98-
.fusebox/
99-
100-
# DynamoDB Local files
101-
.dynamodb/
102-
103-
# TernJS port file
104-
.tern-port
15+
# Documentation
16+
/gh-pages

.travis.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
language: node_js
2+
3+
node_js:
4+
- node
5+
6+
install:
7+
- npm install
8+
9+
before_script:
10+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
11+
- chmod +x ./cc-test-reporter
12+
- ./cc-test-reporter before-build
13+
14+
script:
15+
- npm run travis
16+
17+
after_script:
18+
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
19+
20+
after_success:
21+
- bash <(curl -s https://codecov.io/bash) || true
22+
- coveralls < coverage/lcov.info || true

README.md

+25-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,25 @@
1-
# js-skip-list
2-
Skip list data structure for JavaScript
1+
[@aureooms/js-skip-list](https://aureooms.github.io/js-skip-list)
2+
==
3+
4+
Skip list data structure for JavaScript.
5+
See [docs](https://aureooms.github.io/js-skip-list/index.html).
6+
7+
> :warning: The code requires `regeneratorRuntime` to be defined, for instance by importing
8+
> [regenerator-runtime/runtime](https://www.npmjs.com/package/regenerator-runtime).
9+
10+
[![License](https://img.shields.io/github/license/aureooms/js-skip-list.svg)](https://raw.githubusercontent.com/aureooms/js-skip-list/master/LICENSE)
11+
[![Version](https://img.shields.io/npm/v/@aureooms/js-skip-list.svg)](https://www.npmjs.org/package/@aureooms/js-skip-list)
12+
[![Build](https://img.shields.io/travis/aureooms/js-skip-list/master.svg)](https://travis-ci.org/aureooms/js-skip-list/branches)
13+
[![Dependencies](https://img.shields.io/david/aureooms/js-skip-list.svg)](https://david-dm.org/aureooms/js-skip-list)
14+
[![Dev dependencies](https://img.shields.io/david/dev/aureooms/js-skip-list.svg)](https://david-dm.org/aureooms/js-skip-list?type=dev)
15+
[![GitHub issues](https://img.shields.io/github/issues/aureooms/js-skip-list.svg)](https://github.com/aureooms/js-skip-list/issues)
16+
[![Downloads](https://img.shields.io/npm/dm/@aureooms/js-skip-list.svg)](https://www.npmjs.org/package/@aureooms/js-skip-list)
17+
18+
[![Code issues](https://img.shields.io/codeclimate/issues/aureooms/js-skip-list.svg)](https://codeclimate.com/github/aureooms/js-skip-list/issues)
19+
[![Code maintainability](https://img.shields.io/codeclimate/maintainability/aureooms/js-skip-list.svg)](https://codeclimate.com/github/aureooms/js-skip-list/trends/churn)
20+
[![Code coverage (cov)](https://img.shields.io/codecov/c/gh/aureooms/js-skip-list/master.svg)](https://codecov.io/gh/aureooms/js-skip-list)
21+
<!--[![Code coverage (alls)](https://img.shields.io/coveralls/github/aureooms/js-skip-list/master.svg)](https://coveralls.io/r/aureooms/js-skip-list)-->
22+
<!--[![Code coverage (clim)](https://img.shields.io/codeclimate/coverage/aureooms/js-skip-list.svg)](https://codeclimate.com/github/aureooms/js-skip-list/trends/test_coverage_new_code)-->
23+
[![Code technical debt](https://img.shields.io/codeclimate/tech-debt/aureooms/js-skip-list.svg)](https://codeclimate.com/github/aureooms/js-skip-list/trends/technical_debt)
24+
[![Documentation](https://aureooms.github.io/js-skip-list/badge.svg)](https://aureooms.github.io/js-skip-list/source.html)
25+
[![Package size](https://img.shields.io/bundlephobia/minzip/@aureooms/js-skip-list)](https://bundlephobia.com/result?p=@aureooms/js-skip-list)

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-skip-list/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-skip-list
12+
```
13+
14+
### npm
15+
```terminal
16+
npm install @aureooms/js-skip-list --save
17+
```
18+
19+
### jspm
20+
```terminal
21+
jspm install npm:@aureooms/js-skip-list
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 requires `regeneratorRuntime` to be defined, for instance by importing
4+
> [regenerator-runtime/runtime](https://www.npmjs.com/package/regenerator-runtime).
5+
6+
First, require the polyfill at the entry point of your application
7+
```js
8+
require( 'regenerator-runtime/runtime' );
9+
// or
10+
import 'regenerator-runtime/runtime.js' ;
11+
```
12+
13+
Then, import the library where needed
14+
```js
15+
const skiplist = require( '@aureooms/js-skip-list' ) ;
16+
// or
17+
import * as skiplist from '@aureooms/js-skip-list' ;
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-skip-list';
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-skip-list' ;
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+
});

0 commit comments

Comments
 (0)