This repository has been archived by the owner on Jan 21, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use babel, add eslint, fix eslint errors, adding build step
Signed-off-by: Charles Hansen <chansen@pivotal.io>
- Loading branch information
1 parent
e11992b
commit b2103ab
Showing
19 changed files
with
156 additions
and
49 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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"env": { | ||
"node": true, | ||
"jasmine": true | ||
}, | ||
|
||
"ecmaFeatures": { | ||
"arrowFunctions": true, | ||
"blockBindings": true, | ||
"binaryLiterals": true, | ||
"classes": true, | ||
"defaultParams": true, | ||
"destructuring": true, | ||
"forOf": true, | ||
"generators": true, | ||
"jsx": true, | ||
"objectLiteralComputedProperties": true, | ||
"objectLiteralDuplicateProperties": true, | ||
"objectLiteralShorthandMethods": true, | ||
"objectLiteralShorthandProperties": true, | ||
"octalLiterals": true, | ||
"regexYFlag": true, | ||
"regexUFlag": true, | ||
"restParams": true, | ||
"spread": true, | ||
"superInFunctions": true, | ||
"templateStrings": true, | ||
"unicodeCodePointEscapes": true | ||
}, | ||
|
||
"plugins": [ | ||
"react" | ||
], | ||
|
||
"rules": { | ||
"camelcase": 0, | ||
"curly": 0, | ||
"eol-last": 0, | ||
"no-undef": 0, | ||
"no-path-concat": 0, | ||
"no-process-exit": 0, | ||
"no-shadow": 0, | ||
"no-underscore-dangle": 0, | ||
"no-unused-expressions": 0, | ||
"quotes": [1, "single"], | ||
"react/jsx-uses-vars": 1, | ||
"react/jsx-no-undef": 1, | ||
"react/jsx-quotes": [1, "double", "avoid-escape"], | ||
"react/no-did-mount-set-state": 1, | ||
"react/no-did-update-set-state": 1, | ||
"react/prop-types": [1, {ignore: ['children', 'className', 'id', 'style']}], | ||
"react/self-closing-comp": 1, | ||
"react/wrap-multilines": 1, | ||
"strict": 0 | ||
} | ||
} |
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
/node_modules | ||
node_modules/* | ||
dist/* | ||
.idea/* |
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,4 @@ | ||
require('babel/register'); | ||
process.env.NODE_ENV = process.env.NODE_ENV || 'development'; | ||
var requireDir = require('require-dir'); | ||
requireDir('./tasks'); |
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
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
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 |
---|---|---|
@@ -1 +1 @@ | ||
it('makes a basic failing assertion',function() { expect(true).toBe(false); }); | ||
it('makes a basic failing assertion', function() { expect(true).toBe(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
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
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -183,4 +183,4 @@ getJasmineRequireObj().ConsoleReporter = function() { | |
} | ||
|
||
return ConsoleReporter; | ||
}; | ||
}; |
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
File renamed without changes.
File renamed without changes.
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,15 @@ | ||
var del = require('del'); | ||
var gulp = require('gulp'); | ||
var mergeStream = require('merge-stream'); | ||
var plugins = require('gulp-load-plugins')(); | ||
|
||
gulp.task('clean', function(callback) { | ||
del('dist', callback); | ||
}); | ||
|
||
gulp.task('build', ['clean'], function() { | ||
return mergeStream( | ||
gulp.src('src/**/*.js').pipe(plugins.babel()), | ||
gulp.src(['LICENSE', 'README.md', 'package.json']) | ||
).pipe(gulp.dest('dist')); | ||
}); |
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,6 @@ | ||
var gulp = require('gulp'); | ||
var runSequence = require('run-sequence'); | ||
|
||
gulp.task('default', function(callback) { | ||
runSequence('lint', 'spec', callback); | ||
}); |
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 @@ | ||
var gulp = require('gulp'); | ||
var plugins = require('gulp-load-plugins')(); | ||
|
||
gulp.task('spec', function() { | ||
return gulp.src(['spec/**/*_spec.js', '!spec/fixtures/**/*.js']) | ||
.pipe(plugins.plumber()) | ||
.pipe(plugins.jasmine()); | ||
}); |
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,10 @@ | ||
var gulp = require('gulp'); | ||
var plugins = require('gulp-load-plugins')(); | ||
|
||
gulp.task('lint', function() { | ||
return gulp.src(['gulpfile.js', 'tasks/**/*.js', 'src/**/*.js', 'spec/**/*.js', '!src/lib/console.js']) | ||
.pipe(plugins.plumber()) | ||
.pipe(plugins.eslint()) | ||
.pipe(plugins.eslint.format('stylish')) | ||
.pipe(plugins.eslint.failOnError()); | ||
}); |
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,11 @@ | ||
var gulp = require('gulp'); | ||
var npm = require('npm'); | ||
|
||
gulp.task('publish', ['build'], function(){ | ||
npm.load({}, function(error) { | ||
if (error) return console.error(error); | ||
npm.commands.publish(['dist'], function(error) { | ||
if (error) return console.error(error); | ||
}); | ||
}); | ||
}); |