From bf493216a2102e3766788c44ca05b781d061d8de Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 16 Jun 2015 17:45:05 +0200 Subject: [PATCH] updated gitignore, flow working --- .flowconfig | 5 +---- .gitignore | 3 +++ gulpfile.js | 10 +++++----- src/OperationBuffer.spec.js | 2 +- y.js | 2 +- y.js.map | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.flowconfig b/.flowconfig index ed988791..86c40fc9 100644 --- a/.flowconfig +++ b/.flowconfig @@ -1,10 +1,7 @@ -[ignore] -./build_test - [include] -./src [libs] ./interfaces +./src [options] diff --git a/.gitignore b/.gitignore index 19217bd7..e8619f32 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,6 @@ build_test .c9 .codio .settings +.jshintignore +.jshintrc +.validate.json diff --git a/gulpfile.js b/gulpfile.js index 8139c71e..c3ac7879 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -49,9 +49,9 @@ var concat = require("gulp-concat"); var watch = require("gulp-watch"); var files = { - y: ["src/**/*.js"], + y: ["src/**/*.js", "!src/**/*.spec.js"], lint: ["src/**/*.js", "gulpfile.js"], - specs: ["src/**/*.spec.js"], + test: ["src/**/*.js"], build_test: ["build_test/y.js"] }; @@ -65,7 +65,7 @@ var options = minimist(process.argv.slice(2), { }); gulp.task("build_test", function () { - return gulp.src(files.y.concat(files.specs)) + return gulp.src(files.test) .pipe(sourcemaps.init()) .pipe(concat(options.name)) .pipe(babel({ @@ -105,7 +105,7 @@ gulp.task("lint", function(){ .pipe(eslint.failOnError()); }); -gulp.task("develop", ["build_test", "build"], function(){ +gulp.task("develop", ["test", "build"], function(){ gulp.src(files.build_test) .pipe(watch(files.build_test)) .pipe(jasmineBrowser.specRunner()) @@ -114,4 +114,4 @@ gulp.task("develop", ["build_test", "build"], function(){ return gulp.watch(files.build_test, ["test"]); }); -gulp.task("default", ["build"]); +gulp.task("default", ["build", "test"]); diff --git a/src/OperationBuffer.spec.js b/src/OperationBuffer.spec.js index bf1b6114..e1c5aab4 100644 --- a/src/OperationBuffer.spec.js +++ b/src/OperationBuffer.spec.js @@ -2,7 +2,7 @@ /*eslint-env browser,jasmine,console */ describe("Operation Buffer", function() { - var OB = new OperationBuffer(void 0); + var OB = new OperationBuffer(); it("contains spec with an expectation", function(done) { setTimeout(function(){ diff --git a/y.js b/y.js index 255173ee..4c70debd 100644 --- a/y.js +++ b/y.js @@ -1,2 +1,2 @@ -"use strict";function _classCallCheck(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}var OperationBuffer=function n(){_classCallCheck(this,n),this.i=4};describe("Operation Buffer",function(){var n=new OperationBuffer(void 0);window.console.log(n),it("contains spec with an expectation",function(n){setTimeout(function(){n()},1e3),expect(!0).toBe(!0)})}); +"use strict";function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}var OperationBuffer=function a(){_classCallCheck(this,a),this.i=4}; //# sourceMappingURL=y.js.map \ No newline at end of file diff --git a/y.js.map b/y.js.map index 71688b02..99134837 100644 --- a/y.js.map +++ b/y.js.map @@ -1 +1 @@ -{"version":3,"sources":["y.js","OperationBuffer.js","OperationBuffer.spec.js"],"names":["_classCallCheck","instance","Constructor","TypeError","OperationBuffer","this","i","describe","OB","window","console","log","it","done","setTimeout","expect","toBe"],"mappings":"AAEA,YAEA,SAASA,iBAAgBC,EAAUC,GAAe,KAAMD,YAAoBC,IAAgB,KAAM,IAAIC,WAAU,qCAEhH,GCJAC,iBAEA,QAFAA,KDKEJ,gBAAgBK,KCLlBD,GAGAC,KAAAC,EAAA,ECFAC,UAAA,mBAAA,WACA,GAAAC,GAAA,GAAAJ,iBAAA,OACAK,QAAAC,QAAAC,IAAAH,GAEAI,GAAA,oCAAA,SAAAC,GACAC,WAAA,WACAD,KACA,KACAE,QAAA,GAAAC,MAAA","file":"y.js","sourcesContent":["/* @flow */\n","/* @flow */\n\nclass OperationBuffer { //eslint-disable-line no-unused-vars\n i : number;\n constructor () {\n this.i = 4;\n }\n}\n","/* @flow */\n/*eslint-env browser,jasmine */\n\ndescribe(\"Operation Buffer\", function() {\n var OB = new OperationBuffer(void 0);\n window.console.log(OB);\n\n it(\"contains spec with an expectation\", function(done) {\n setTimeout(function(){\n done();\n }, 1000);\n expect(true).toBe(true);\n });\n});\n"],"sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"sources":["y.js","OperationBuffer.js"],"names":["_classCallCheck","instance","Constructor","TypeError","OperationBuffer","this","i"],"mappings":"AAEA,YAEA,SAASA,iBAAgBC,EAAUC,GAAe,KAAMD,YAAoBC,IAAgB,KAAM,IAAIC,WAAU,qCAEhH,GCJAC,iBAEA,QAFAA,KDKEJ,gBAAgBK,KCLlBD,GAGAC,KAAAC,EAAA","file":"y.js","sourcesContent":["/* @flow */\n","/* @flow */\n\nclass OperationBuffer { //eslint-disable-line no-unused-vars\n i : number;\n constructor () {\n this.i = 4;\n }\n}\n"],"sourceRoot":"/source/"} \ No newline at end of file