This repository has been archived by the owner on Jun 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from C2FO/node-5
Node 4 and 5 support
- Loading branch information
Showing
27 changed files
with
7,371 additions
and
6,672 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ node_modules | |
.DS_store | ||
*.iml | ||
lib-cov | ||
.idea | ||
atlassian-ide-plugin.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"predef": [ | ||
"console", | ||
"setImmediate" | ||
], | ||
"globals": { | ||
"Promise": true, | ||
"Proxy": true, | ||
"setImmediate": false | ||
}, | ||
"node": true, | ||
"browser": false, | ||
"devel": true, | ||
"jquery": false, | ||
"bitwise": false, | ||
"camelcase": true, | ||
"curly": true, | ||
"eqeqeq": true, | ||
"forin": false, | ||
"immed": true, | ||
"indent": 4, | ||
"latedef": "nofunc", | ||
"newcap": true, | ||
"noarg": true, | ||
"noempty": true, | ||
"nonew": false, | ||
"plusplus": false, | ||
"quotmark": false, | ||
"regexp": false, | ||
"undef": true, | ||
"unused": false, | ||
"strict": true, | ||
"trailing": true, | ||
"white": false, | ||
"asi": false, | ||
"boss": false, | ||
"debug": false, | ||
"eqnull": true, | ||
"esnext": true, | ||
"evil": false, | ||
"expr": true, | ||
"funcscope": false, | ||
"globalstrict": false, | ||
"iterator": false, | ||
"lastsemic": false, | ||
"laxbreak": false, | ||
"laxcomma": false, | ||
"loopfunc": false, | ||
"multistr": false, | ||
"onecase": false, | ||
"proto": false, | ||
"regexdash": false, | ||
"scripturl": false, | ||
"smarttabs": false, | ||
"shadow": false, | ||
"sub": true, | ||
"supernew": true, | ||
"validthis": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
node_modules | ||
.DS_store | ||
*.iml | ||
lib-cov | ||
.idea | ||
atlassian-ide-plugin.xml | ||
docs | ||
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
env: | ||
- CXX=g++-4.8 | ||
|
||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- g++-4.8 | ||
|
||
before_script: | ||
- npm install -g grunt-cli | ||
|
||
sudo: false | ||
|
||
after_script: | ||
- grunt coveralls | ||
|
||
language: node_js | ||
node_js: | ||
- "4" | ||
- "5" | ||
- "stable" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
"use strict"; | ||
/*global module:false*/ | ||
module.exports = function (grunt) { | ||
|
||
// Automatic module definition loading. Significantly speeds up build cycles | ||
require('jit-grunt')(grunt); | ||
|
||
// Time how long tasks take. Can help when optimizing build times | ||
require('time-grunt')(grunt); | ||
|
||
// Project configuration. | ||
var DEFAULT_COVERAGE_ARGS = ["cover", "-x", "Gruntfile.js", "--report", "none", "--print", "none", "--include-pid", "grunt", "--", "it"], | ||
path = require("path"); | ||
|
||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
|
||
comb: { | ||
paths: { | ||
root: './', | ||
lib: './lib', | ||
test: './test' | ||
} | ||
}, | ||
|
||
jshint: { | ||
src: [ | ||
"./index.js", | ||
"<%= comb.paths.lib %>/**/*.js", | ||
"<%= comb.paths.test %>/**/*.js", | ||
"Gruntfile.js" | ||
], | ||
options: { | ||
jshintrc: '.jshintrc' | ||
} | ||
}, | ||
|
||
exec: { | ||
sendToCoveralls: "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", | ||
removeCoverage: "rm -rf ./coverage", | ||
removeDocs: "rm -rf docs/*", | ||
createDocs: 'coddoc -f multi-html -d ./lib --dir ./docs' | ||
}, | ||
|
||
it: { | ||
all: { | ||
src: 'test/**/*.test.js', | ||
options: { | ||
timeout: 3000, // not fully supported yet | ||
reporter: 'tap' | ||
} | ||
} | ||
} | ||
}); | ||
|
||
grunt.registerTask("benchmarks", "runs benchmarks", function () { | ||
var done = this.async(); | ||
require("./benchmark/benchmark")() | ||
.then(function () { | ||
done(true); | ||
}) | ||
.catch(function (err) { | ||
console.log(err.stack || err); | ||
done(false); | ||
|
||
}); | ||
}); | ||
|
||
grunt.registerTask("spawn-test-coverage", "spawn tests with coverage", function () { | ||
var done = this.async(); | ||
var env = process.env; | ||
grunt.util.spawn({ | ||
cmd: "./node_modules/istanbul/lib/cli.js", | ||
args: DEFAULT_COVERAGE_ARGS, | ||
opts: {stdio: 'inherit', env: env} | ||
}, function (err) { | ||
if (err) { | ||
console.log(err); | ||
done(false); | ||
} else { | ||
done(); | ||
} | ||
}); | ||
}); | ||
|
||
|
||
grunt.registerTask("process-coverage", "process coverage obects", function () { | ||
var files = grunt.file.expand("./coverage/coverage*.json"), | ||
istanbul = require('istanbul'), | ||
collector = new istanbul.Collector(), | ||
reporter = new istanbul.Reporter(), | ||
sync = false, | ||
done = this.async(); | ||
|
||
files.forEach(function (file) { | ||
collector.add(grunt.file.readJSON(file)); | ||
}); | ||
|
||
reporter.add('text'); | ||
reporter.addAll(['lcovonly']); | ||
reporter.write(collector, sync, function (err) { | ||
if (err) { | ||
console.error(err.stack); | ||
return done(false); | ||
} | ||
console.log('All reports generated'); | ||
done(); | ||
}); | ||
}); | ||
|
||
grunt.registerTask('default', ['jshint', "test", "test-coverage", "docs"]); | ||
|
||
grunt.registerTask('test', ['it']); | ||
|
||
grunt.registerTask('coveralls', ['exec:removeCoverage', 'spawn-test-coverage', 'process-coverage', 'exec:sendToCoveralls', 'exec:removeCoverage']); | ||
grunt.registerTask('test-coverage', ['exec:removeCoverage', 'spawn-test-coverage', 'process-coverage', 'exec:removeCoverage']); | ||
|
||
|
||
grunt.registerTask("docs", ["exec:removeDocs", "exec:createDocs"]); | ||
}; |
Oops, something went wrong.