Skip to content

Commit f046647

Browse files
$ js new
1 parent b45113b commit f046647

13 files changed

+271
-57
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/**"

.gitignore

+6-55
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,10 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
1+
# Dependency directory
2+
node_modules
3+
jspm_packages
74

8-
# Runtime data
9-
pids
10-
*.pid
11-
*.seed
12-
*.pid.lock
13-
14-
# Directory for instrumented libs generated by jscoverage/JSCover
15-
lib-cov
16-
17-
# Coverage directory used by tools like istanbul
5+
# Coverage directory used by nyc
186
coverage
19-
20-
# nyc test coverage
217
.nyc_output
228

23-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24-
.grunt
25-
26-
# Bower dependency directory (https://bower.io/)
27-
bower_components
28-
29-
# node-waf configuration
30-
.lock-wscript
31-
32-
# Compiled binary addons (http://nodejs.org/api/addons.html)
33-
build/Release
34-
35-
# Dependency directories
36-
node_modules/
37-
jspm_packages/
38-
39-
# Typescript v1 declaration files
40-
typings/
41-
42-
# Optional npm cache directory
43-
.npm
44-
45-
# Optional eslint cache
46-
.eslintcache
47-
48-
# Optional REPL history
49-
.node_repl_history
50-
51-
# Output of 'npm pack'
52-
*.tgz
53-
54-
# Yarn Integrity file
55-
.yarn-integrity
56-
57-
# dotenv environment variables file
58-
.env
59-
9+
# Documentation
10+
gh-pages

.travis.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
language: node_js
2+
3+
node_js:
4+
- node
5+
6+
install:
7+
- npm install
8+
9+
script:
10+
- npm run cover
11+
12+
after_success:
13+
- bash <(curl -s https://codecov.io/bash) || true
14+
- coveralls < coverage/lcov.info || true
15+
- codeclimate-test-reporter < coverage/lcov.info || true

README.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
1-
# js-mincut
2-
Minimum cut problem for JavaScript
1+
[@aureooms/js-mincut](https://aureooms.github.io/js-mincut)
2+
==
3+
4+
Minimum cut problem for JavaScript.
5+
See [docs](https://aureooms.github.io/js-mincut/index.html).
6+
7+
[![License](https://img.shields.io/github/license/aureooms/js-mincut.svg?style=flat)](https://raw.githubusercontent.com/aureooms/js-mincut/master/LICENSE)
8+
[![NPM version](https://img.shields.io/npm/v/@aureooms/js-mincut.svg?style=flat)](https://www.npmjs.org/package/@aureooms/js-mincut)
9+
[![Build status](https://img.shields.io/travis/aureooms/js-mincut.svg?style=flat)](https://travis-ci.org/aureooms/js-mincut)
10+
[![Coverage status](https://img.shields.io/coveralls/aureooms/js-mincut.svg?style=flat)](https://coveralls.io/r/aureooms/js-mincut)
11+
[![Dependencies status](https://img.shields.io/david/aureooms/js-mincut.svg?style=flat)](https://david-dm.org/aureooms/js-mincut)
12+
[![Dev dependencies status](https://img.shields.io/david/dev/aureooms/js-mincut.svg?style=flat)](https://david-dm.org/aureooms/js-mincut?type=dev)
13+
[![Code Climate](https://img.shields.io/codeclimate/github/aureooms/js-mincut.svg?style=flat)](https://codeclimate.com/github/aureooms/js-mincut)
14+
[![NPM downloads per month](https://img.shields.io/npm/dm/@aureooms/js-mincut.svg?style=flat)](https://www.npmjs.org/package/@aureooms/js-mincut)
15+
[![GitHub issues](https://img.shields.io/github/issues/aureooms/js-mincut.svg?style=flat)](https://github.com/aureooms/js-mincut/issues)
16+
[![Documentation](https://aureooms.github.io/js-mincut/badge.svg)](https://aureooms.github.io/js-mincut/source.html)

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

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

doc/manual/installation.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Installation
2+
3+
Can be managed using
4+
[jspm](http://jspm.io)
5+
or [npm](https://github.com/npm/npm).
6+
7+
### jspm
8+
```terminal
9+
jspm install npm:@aureooms/js-mincut
10+
```
11+
12+
### npm
13+
```terminal
14+
npm install @aureooms/js-mincut --save
15+
```

doc/manual/overview.md

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

doc/manual/usage.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Usage
2+
3+
The code needs a ES2015+ polyfill to work, for example
4+
[babel-polyfill](https://babeljs.io/docs/usage/polyfill).
5+
```js
6+
require( 'babel-polyfill' ) ;
7+
// or
8+
import 'babel-polyfill' ;
9+
```
10+
11+
Then
12+
```js
13+
const mincut = require( '@aureooms/js-mincut' ) ;
14+
// or
15+
import * as mincut from '@aureooms/js-mincut' ;
16+
```

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-mincut';
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-mincut' ;
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+
});

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-mincut"
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+
}

package.json

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"name": "@aureooms/js-mincut",
3+
"description": "Minimum cut problem for JavaScript",
4+
"version": "0.0.0",
5+
"author": "aureooms",
6+
"ava": {
7+
"require": [
8+
"babel-polyfill",
9+
"babel-register"
10+
]
11+
},
12+
"babel": {
13+
"presets": [
14+
"env"
15+
],
16+
"env": {
17+
"development": {
18+
"sourceMaps": "inline"
19+
}
20+
}
21+
},
22+
"bugs": {
23+
"url": "https://github.com/aureooms/js-mincut/issues"
24+
},
25+
"dependencies": {},
26+
"devDependencies": {
27+
"ava": "^0.24.0",
28+
"babel-cli": "^6.26.0",
29+
"babel-polyfill": "^6.26.0",
30+
"babel-preset-env": "^1.6.1",
31+
"codeclimate-test-reporter": "^0.5.0",
32+
"coveralls": "^3.0.0",
33+
"esdoc": "^1.0.3",
34+
"esdoc-inject-script-plugin": "^1.0.0",
35+
"esdoc-inject-style-plugin": "^1.0.0",
36+
"esdoc-standard-plugin": "^1.0.0",
37+
"np": "^2.18.3",
38+
"nyc": "^11.2.1"
39+
},
40+
"homepage": "https://aureooms.github.io/js-mincut",
41+
"keywords": ["cut", "graph", "min-cut", "minimum"],
42+
"license": "AGPL-3.0",
43+
"main": "lib/index.js",
44+
"repository": {
45+
"type": "git",
46+
"url": "https://github.com/aureooms/js-mincut"
47+
},
48+
"scripts": {
49+
"build": "rm -rf lib && babel src -d lib",
50+
"cover": "nyc --reporter=lcov npm test",
51+
"esdoc": "esdoc",
52+
"prepare": "npm run build",
53+
"release": "np",
54+
"test": "ava ./test/src"
55+
}
56+
}

0 commit comments

Comments
 (0)