Permalink
Browse files

hint, jscs, and test without grunt

  • Loading branch information...
1 parent addf461 commit 2713d8c281c8dd5a5dbe89cccef7ae200a1ebdf0 @buzzdecafe buzzdecafe committed May 1, 2015
Showing with 30,186 additions and 128 deletions.
  1. +1 −1 .gitignore
  2. +8 −0 .jscsrc
  3. +7 −0 .jshintignore
  4. +1 −2 .travis.yml
  5. +0 −110 Gruntfile.js
  6. +30,132 −0 lib/test/bundle.js
  7. +5 −6 { → lib}/test/index.html
  8. +10 −9 package.json
  9. +18 −0 scripts/testfiles
  10. 0 test/{ → helpers}/test.examplesRunner.js
  11. +1 −0 test/keys.js
  12. +1 −0 test/keysIn.js
  13. +1 −0 test/values.js
  14. +1 −0 test/valuesIn.js
View
@@ -4,7 +4,7 @@
/index.js
/npm-debug.log
/ramda.js.tmp
-/test/bundle.js
+/lib/test/bundle.js
/tmp
/bower_components/
/dist/gh-pages/
View
@@ -13,6 +13,14 @@
"disallowSpacesInsideParentheses": true,
"disallowTrailingWhitespace": true,
"disallowYodaConditions": true,
+ "excludeFiles": [
+ "dist/**",
+ "lib/test/**",
+ "node_modules/**",
+ "bower_components/**",
+ "test/bundle.js",
+ "**/*.min.js"
+ ],
"requireCapitalizedConstructors": true,
"requireCommaBeforeLineBreak": true,
"requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch", "finally"],
View
@@ -0,0 +1,7 @@
+**/*.min.js
+test/index.html
+test/bundle.js
+dist/**
+lib/test/**
+node_modules/**
+bower_components/**
View
@@ -5,5 +5,4 @@ node_js:
- 'iojs-v1.5.1'
before_script:
- npm install -g grunt-cli
-script:
-- make test lint
+- make clean && make dist/ramda.js
View
@@ -1,9 +1,5 @@
var envvar = require('envvar');
-var sauceConf = require('./lib/sauce/conf');
-var sauceSrv = require('./lib/sauce/server');
-var ORCHESTRATE_API_KEY = envvar.string('ORCHESTRATE_API_KEY', '');
-var SAUCE_ACCESS_KEY = envvar.string('SAUCE_ACCESS_KEY', '');
var TRAVIS_BRANCH = envvar.string('TRAVIS_BRANCH', '');
var TRAVIS_BUILD_ID = envvar.string('TRAVIS_BUILD_ID', '');
var TRAVIS_COMMIT = envvar.string('TRAVIS_COMMIT', '');
@@ -20,69 +16,13 @@ var jsFiles = [
module.exports = function(grunt) {
grunt.initConfig({
- orchestrate_token: ORCHESTRATE_API_KEY,
-
- mocha: {
- browser: ['test/**/*.html'],
- options: {
- run: true
- }
- },
-
- mochaTest: {
- docs: {
- options: {
- reporter: 'spec'
- },
- src: ['test/test.examplesRunner.js']
- },
- test: {
- options: {
- reporter: 'spec'
- },
- src: ['test/**/*.js', '!{test/bundle.js}']
- },
- unit: {
- options: {
- reporter: 'spec'
- },
- src: ['test/**/*.js', '!{test/test.examplesRunner.js,test/bundle.js}']
- }
- },
-
- jscs: {
- files: jsFiles,
- options: {
- config: '.jscsrc',
- excludeFiles: ['**/*.min.js', 'test/bundle.js']
- }
- },
-
- jshint: {
- files: jsFiles,
- options: {
- ignores: ['**/*.min.js', 'test/bundle.js'],
- jshintrc: '.jshintrc'
- }
- },
-
benchmark: {
all: {
src: ['lib/bench/*.bench.js'],
dest: 'lib/bench/report/bench.<%= (new Date()).getTime() %>.json'
}
},
- browserify: {
- client: {
- src: ['test/*.js', '!{test/test.examplesRunner.js,test/bundle.js}'],
- dest: 'test/bundle.js',
- options: {
- external: ['R']
- }
- }
- },
-
less: {
'gh-pages': {
files: {
@@ -124,10 +64,6 @@ module.exports = function(grunt) {
}
},
- 'saucelabs-mocha': sauceConf,
-
- connect: sauceSrv,
-
watch: {
docs: {
files: ['./Gruntfile.js', './lib/doc/*', './lib/doc/jsdoc-template/*'],
@@ -154,65 +90,19 @@ module.exports = function(grunt) {
}
});
- grunt.loadNpmTasks('grunt-browserify');
- grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-clean');
- grunt.loadNpmTasks('grunt-jscs');
grunt.loadNpmTasks('grunt-jsdoc');
- grunt.loadNpmTasks('grunt-mocha');
- grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-benchmark');
- grunt.loadNpmTasks('grunt-saucelabs');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-express');
grunt.loadNpmTasks('grunt-open');
grunt.loadTasks('lib/grunt/tasks');
- grunt.registerTask('uploadBenchmarks', 'upload benchmark report to orchestrate', function() {
- // upload files in report dir to orchestrate
- var done = this.async();
- var reportDir = 'lib/bench/report/';
- var token = grunt.config.get('orchestrate_token');
- var db = require('orchestrate')(token);
-
- grunt.file.recurse(reportDir, function(abspath, rootdir, subdir, filename) {
- var json = {};
- var timestamp = filename.split('.')[1];
- if (timestamp) {
- json.timestamp = timestamp;
- json.datestamp = (new Date(+timestamp)).toISOString();
- json.platform = {
- branch: TRAVIS_BRANCH,
- buildId: TRAVIS_BUILD_ID,
- commit: TRAVIS_COMMIT,
- commitRange: TRAVIS_COMMIT_RANGE,
- tag: TRAVIS_TAG,
- node: TRAVIS_NODE_VERSION
- };
- json.report = grunt.file.readJSON(abspath);
- db.put('benchmarks', json.timestamp, json)
- .then(function() {
- console.log('SUCCESS');
- grunt.file.delete(abspath);
- done();
- })
- .fail(function(err) {
- console.log('FAIL', err.body.message);
- done();
- });
- }
- });
- });
-
grunt.registerTask('bench', ['benchmark', 'uploadBenchmarks']);
- grunt.registerTask('sauce', SAUCE_ACCESS_KEY === '' ? [] : ['connect', 'saucelabs-mocha']);
- grunt.registerTask('test', ['jshint', 'jscs', 'browserify:client', 'mochaTest:unit']);
- grunt.registerTask('unittest', ['browserify:client', 'mochaTest:unit']);
- grunt.registerTask('doctest', ['mochaTest:docs']);
grunt.registerTask('gh-pages', [
'clean:gh-pages',
'less:gh-pages',
Oops, something went wrong.

0 comments on commit 2713d8c

Please sign in to comment.