scozv / algo-js

[obsoleted] has been moved to project Tango:
https://github.com/scozv/tango
GNU General Public License v3.0
2 stars 1 forks source link

Build Status

Algo.js

####### 简体中文 ####### Version: 3.1 ####### Implementation of some algorithms using ECMAScript 6

Abstract

This is a project containing implementation of some fundamental algorithms in ECMAScript 6 with arrow functions enabled. I use Mocha for unit test, istanbul for code coverage, and drone.io for CI.

Documentation

Read new API Documentation page for details.

Milestone

Use following command to list the history tags:

git tag -n
When What Where
2016↓ - -
Aug, 30 istanbul for code coverage mocha-instanbul
Aug, 30 switch to webpack and ES 6 05a6c70
2015↓ - -
Aug, 03 publish API page in zh-cn 接口文档
Aug, 01 introduce new tag version naming system
Aug, 01 introduce big test file for SCC algorithm
May, 21 drone.io with nodejs 0.12
May, 16 Start to replace return with Arrow functions in JavaScript
2014↓ - -
Aug, 27 An initial PDF document of API writed in LaTeX has been released Releases
Jun, 14 Start to migrate API docs to project wiki page API page
2013↓ - -
Dec,20 Introduce Continuous Integration by drone.io e03180d
Dec,12 Start to migrate Algo.js from Google Code b39f7f7
Oct,18 Proudly finish the implementation of iteration Tarjan algorithm on strongly connected components 4542b93
Sept,27 Start to pay attention on JSLint
Jul,12 Add code coverage 600ee7d
May,23 Start unit test dad30d6
May,23 Switch SVN to Git 3b0c92e

Harmony

I don't like returning value with return, so I enable harmony option of nodejs by default. Currently, only Firefox 22.0+ and Chrome 45+ supports arrow functions (MDN).

nodejs --harmony

CI Scripts

Use following scripts to initialize your environments.

drone.io

nvm install v5.11.1
nodejs --version
npm i
npm install -g mocha istanbul
npm run coverage

Travis CI

# .travis.yml
language: node_js
node_js:
  - "v5.11.1"
script: 'npm install -g mocha istanbul && npm i && npm run coverage'

Test and Coverage

Use following commands to run tests or coverage. The result of converge will be located converage.html

npm test

The default mocha task has been configured in package.json.

Migration

I have migrated this project from Algo.js in Google Code, with API page and issue.

Due to default option of git log in github is no option, so please use command below to follow the full history of the codes which I have moved from root into src/ during this migration:

git log --follow src/index.js