Skip to content

Commit

Permalink
[INIT]
Browse files Browse the repository at this point in the history
  • Loading branch information
kgryte committed Jun 23, 2015
0 parents commit c02aaf3
Show file tree
Hide file tree
Showing 16 changed files with 821 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
@@ -0,0 +1,11 @@
root = true

[*]
indent_style = tab
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .gitattributes
@@ -0,0 +1 @@
* text=auto
62 changes: 62 additions & 0 deletions .gitignore
@@ -0,0 +1,62 @@

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

# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so

# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# Logs and databases #
######################
*.log
*.sql
*.sqlite

# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db
Desktop.ini

# Temporary files #
###################
*~

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

# Matlab #
##########

# Windows default autosave extension
*.asv

# Compiled MEX binaries (all platforms)
*.mex*
14 changes: 14 additions & 0 deletions .jshintignore
@@ -0,0 +1,14 @@

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

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

# Git #
#######
.git*
71 changes: 71 additions & 0 deletions .jshintrc
@@ -0,0 +1,71 @@
{
"bitwise": false,
"camelcase": false,
"curly": true,
"eqeqeq": true,
"es3": false,
"forin": true,
"freeze": true,
"immed": true,
"indent": 4,
"latedef": "nofunc",
"newcap": true,
"noarg": true,
"noempty": false,
"nonbsp": true,
"nonew": true,
"plusplus": false,
"quotmark": "single",
"undef": true,
"unused": true,
"strict": true,
"maxparams": 10,
"maxdepth": 5,
"maxstatements": 100,
"maxcomplexity": false,
"maxlen": 1000,
"asi": false,
"boss": false,
"debug": false,
"eqnull": false,
"esnext": false,
"evil": false,
"expr": false,
"funcscope": false,
"globalstrict": false,
"iterator": false,
"lastsemic": false,
"laxbreak": false,
"laxcomma": false,
"loopfunc": false,
"maxerr": 1000,
"moz": false,
"multistr": false,
"notypeof": false,
"proto": false,
"scripturl": false,
"shadow": false,
"sub": true,
"supernew": false,
"validthis": false,
"noyield": false,
"browser": true,
"browserify": true,
"couch": false,
"devel": true,
"dojo": false,
"jasmine": false,
"jquery": false,
"mocha": true,
"mootools": false,
"node": true,
"nonstandard": false,
"prototypejs": false,
"qunit": false,
"rhino": false,
"shelljs": false,
"worker": false,
"wsh": false,
"yui": false,
"globals": {}
}
52 changes: 52 additions & 0 deletions .npmignore
@@ -0,0 +1,52 @@

# Files #
#########
Makefile
README.md
TODO.md

# Directories #
###############
build/
docs/
examples/
reports/
support/
test/
benchmark/

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

# Logs #
########
*.log

# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db
Desktop.ini

# Temporary files #
###################
*~

# Git #
#######
.git*

# Utilities #
#############
.jshintrc
.jshintignore
.travis.yml
.editorconfig
12 changes: 12 additions & 0 deletions .travis.yml
@@ -0,0 +1,12 @@
language: node_js
node_js:
- '0.12'
- '0.11'
- '0.10'
- '0.8'
- 'iojs'
before_install:
- npm update -g npm
after_script:
- npm run coveralls

21 changes: 21 additions & 0 deletions LICENSE
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2015 Athan Reines.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
144 changes: 144 additions & 0 deletions Makefile
@@ -0,0 +1,144 @@

#############
# VARIABLES #

# Set the node.js environment to test:
NODE_ENV ?= test

# Kernel name:
KERNEL ?= $(shell uname -s)

ifeq ($(KERNEL), Darwin)
OPEN ?= open
else
OPEN ?= xdg-open
endif

# NOTES #

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


# MOCHA #

MOCHA ?= ./node_modules/.bin/mocha
_MOCHA ?= ./node_modules/.bin/_mocha
MOCHA_REPORTER ?= spec


# ISTANBUL #

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



# FILES #

# Source files:
SOURCES ?= lib/*.js

# Test files:
TESTS ?= test/*.js




###########
# TARGETS #


# NOTES #

.PHONY: notes

notes:
grep -Ern $(NOTES) $(SOURCES) $(TESTS)



# UNIT TESTS #

.PHONY: test test-mocha

test: test-mocha

test-mocha: node_modules
NODE_ENV=$(NODE_ENV) \
NODE_PATH=$(NODE_PATH_TEST) \
$(MOCHA) \
--reporter $(MOCHA_REPORTER) \
$(TESTS)



# CODE COVERAGE #

.PHONY: test-cov test-istanbul-mocha

test-cov: test-istanbul-mocha

test-istanbul-mocha: node_modules
NODE_ENV=$(NODE_ENV) \
NODE_PATH=$(NODE_PATH_TEST) \
$(ISTANBUL) cover \
--dir $(ISTANBUL_OUT) \
--report $(ISTANBUL_REPORT) \
$(_MOCHA) -- \
--reporter $(MOCHA_REPORTER) \
$(TESTS)



# COVERAGE REPORT #

.PHONY: view-cov view-istanbul-report

view-cov: view-istanbul-report

view-istanbul-report:
$(OPEN) $(ISTANBUL_HTML_REPORT_PATH)


# LINT #

.PHONY: lint lint-jshint

lint: lint-jshint

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


# NODE #

# Installing node_modules:
.PHONY: install

install:
npm install

# Clean node:
.PHONY: clean-node

clean-node:
rm -rf node_modules



# CLEAN #
.PHONY: clean

clean:
rm -rf build

0 comments on commit c02aaf3

Please sign in to comment.