diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..eabdf9e --- /dev/null +++ b/.eslintrc @@ -0,0 +1,12 @@ +{ + "parserOptions": { + "ecmaVersion": 6, + "sourceType": "module", + "ecmaFeatures": { + "jsx": true + } + }, + "rules": { + "semi": 2 + } +} diff --git a/.travis.yml b/.travis.yml index 5682764..ce20129 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,9 @@ language: node_js node_js: - - v6 - - v5 - v4 - - '0.12' - - '0.10' + - v6 notifications: email: - XChen@walmartlabs.com - ananavati@walmartlabs.com +before_install: if [[ `npm -v` != 3* ]]; then npm i -g npm@3; npm --version; fi diff --git a/gulpfile.js b/gulpfile.js index d5f5e6b..62aebd5 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -2,7 +2,6 @@ var path = require('path'); var gulp = require('gulp'); var eslint = require('gulp-eslint'); -var excludeGitignore = require('gulp-exclude-gitignore'); var mocha = require('gulp-mocha'); var istanbul = require('gulp-istanbul'); var nsp = require('gulp-nsp'); @@ -10,12 +9,11 @@ var plumber = require('gulp-plumber'); var gulpIgnore = require('gulp-ignore'); function excludeTemplates() { - return gulpIgnore.exclude('**/templates/**'); + return gulpIgnore.exclude(['**/templates/**', '**/node_modules/**']); } gulp.task('static', function () { - return gulp.src('**/*.js') - .pipe(excludeGitignore()) + return gulp.src(['*.js', 'test/**/*.js', 'generators/**/*.js']) .pipe(excludeTemplates()) .pipe(eslint()) .pipe(eslint.format()) @@ -28,7 +26,6 @@ gulp.task('nsp', function (cb) { gulp.task('pre-test', function () { return gulp.src('generators/**/*.js') - .pipe(excludeGitignore()) .pipe(excludeTemplates()) .pipe(istanbul({ includeUntested: true diff --git a/package.json b/package.json index 6773b48..48acf71 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,6 @@ "eslint": "^3.1.1", "gulp": "^3.9.0", "gulp-eslint": "^2.0.0", - "gulp-exclude-gitignore": "^1.0.0", "gulp-ignore": "^2.0.1", "gulp-istanbul": "^1.0.0", "gulp-line-ending-corrector": "^1.0.1", @@ -55,7 +54,7 @@ }, "scripts": { "prepublish": "gulp prepublish", - "test": "gulp test" + "test": "gulp" }, "license": "Apache-2.0" }