Skip to content

Commit

Permalink
[UPDATE] dotfiles, dependencies, README.md etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
Planeshifter committed Mar 20, 2015
1 parent d55ac19 commit 1b9ead4
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
14 changes: 14 additions & 0 deletions .jshintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

# Directories #
###############
build/
reports/
dist/

# Node.js #
###########
/node_modules/

# Git #
#######
.git*
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@ Desktop.ini
# Utilities #
#############
.jshintrc
.jshintignore
.travis.yml
.editorconfig
11 changes: 9 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
language: node_js
node_js:
- "0.10"
- '0.12'
- '0.11'
- '0.10'
- '0.8'
- 'iojs'
before_install:
- npm update -g npm
after_script:
- npm run coveralls
- npm run coveralls

25 changes: 19 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,31 @@ NODE_ENV ?= test

# NOTES #

NOTES ?= 'TODO|FIXME'
NOTES ?= 'TODO|FIXME|WARNING|HACK|NOTE'


# MOCHA #

# Specify the test framework bin locations:
MOCHA ?= ./node_modules/.bin/mocha
_MOCHA ?= ./node_modules/.bin/_mocha

# Specify the mocha reporter:
MOCHA_REPORTER ?= spec


# ISTANBUL #

# Istanbul configuration:
ISTANBUL ?= ./node_modules/.bin/istanbul
ISTANBUL_OUT ?= ./reports/coverage
ISTANBUL_REPORT ?= lcov
ISTANBUL_LCOV_INFO_PATH ?= $(ISTANBUL_OUT)/lcov.info
ISTANBUL_HTML_REPORT_PATH ?= $(ISTANBUL_OUT)/lcov-report/index.html


# JSHINT #

JSHINT ?= ./node_modules/.bin/jshint
JSHINT_REPORTER ?= ./node_modules/jshint-stylish/stylish.js



# FILES #

Expand Down Expand Up @@ -100,6 +102,18 @@ view-istanbul-report:



# LINT #

.PHONY: lint lint-jshint

lint: lint-jshint

lint-jshint: node_modules
$(JSHINT) \
--reporter $(JSHINT_REPORTER) \
./


# NODE #

# Installing node_modules:
Expand All @@ -117,7 +131,6 @@ clean-node:


# CLEAN #

.PHONY: clean

clean:
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
incrspace
Incrspace
===
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Dependencies][dependencies-image]][dependencies-url]

Expand All @@ -16,7 +16,6 @@ For use in the browser, use [browserify](https://github.com/substack/node-browse

## Usage

To use the module,

``` javascript
var incrspace = require( 'compute-incrspace' );
Expand All @@ -42,7 +41,7 @@ var arr = incrspace( 0.1, 0.5, 0.2 );
// returns [ 0, ~0.3 ]
```

where `arr[1]` is only guaranteed to be approximately equal to `0.3`.
where `arr[1]` is only guaranteed to be approximately equal to `0.3`.


If you desire more control over element precision, consider using [compute-roundn](https://github.com/compute-io/roundn):
Expand Down Expand Up @@ -120,15 +119,15 @@ $ make view-cov
```


---
## License

[MIT license](http://opensource.org/licenses/MIT).
[MIT license](http://opensource.org/licenses/MIT).


---
## Copyright

Copyright © 2014. Athan Reines.
Copyright © 2014-2015. Athan Reines.


[npm-image]: http://img.shields.io/npm/v/compute-incrspace.svg
Expand Down
8 changes: 4 additions & 4 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* LICENSE:
* MIT
*
* Copyright (c) 2014. Athan Reines.
* Copyright (c) 2014-2015. Athan Reines.
*
*
* AUTHOR:
Expand All @@ -42,16 +42,16 @@
function incrspace( x1, x2, inc ) {
var arr, len, i;
if ( typeof x1 !== 'number' || x1 !== x1 ) {
throw new TypeError( 'incrspace()::invalid input argument. Start must be numeric.' );
throw new TypeError( 'incrspace()::invalid input argument. Start must be numeric. Value: `' + x1 + '`.' );
}
if ( typeof x2 !== 'number' || x2 !== x2 ) {
throw new TypeError( 'incrspace()::invalid input argument. Stop must be numeric.' );
throw new TypeError( 'incrspace()::invalid input argument. Stop must be numeric. Value: `' + x2 + '`.' );
}
if ( arguments.length < 3 ) {
inc = 1;
} else {
if ( typeof inc !== 'number' || inc !== inc ) {
throw new TypeError( 'incrspace()::invalid input argument. Increment must be numeric.' );
throw new TypeError( 'incrspace()::invalid input argument. Increment must be numeric. Value: `' + inc + '`.' );
}
}
// Calculate the array length:
Expand Down
14 changes: 11 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
{
"name": "Athan Reines",
"email": "kgryte@gmail.com"
},
{
"name": "Philipp Burckhardt",
"email": "pburckhardt@outlook.com"
}
],
"scripts": {
Expand All @@ -30,19 +34,23 @@
"utils",
"array",
"linear",
"sequence",
"mathematics",
"math"
],
"bugs": {
"url": "https://github.com/compute-io/incrspace/issues"
},
"dependencies": {},
"dependencies": {
},
"devDependencies": {
"chai": "1.x.x",
"chai": "2.x.x",
"compute-roundn": "^1.0.3",
"coveralls": "^2.11.1",
"istanbul": "^0.3.0",
"mocha": "1.x.x"
"mocha": "2.x.x",
"jshint": "^2.6.3",
"jshint-stylish": "^1.0.1"
},
"licenses": [
{
Expand Down
1 change: 1 addition & 0 deletions test/test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* global require, describe, it */
'use strict';

// MODULES //
Expand Down

0 comments on commit 1b9ead4

Please sign in to comment.