Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
90340ae
commit b06af5a
Showing
13 changed files
with
269 additions
and
270 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,41 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"node": true | ||
}, | ||
|
||
"parser": "babel-eslint", | ||
|
||
"ecmaFeatures": { | ||
"modules": true, | ||
"jsx": true | ||
}, | ||
|
||
"rules": { | ||
"strict": 0, | ||
|
||
"comma-dangle": [2, "always-multiline"], | ||
"no-floating-decimal": 2, | ||
|
||
"indent": [2, 2, {"indentSwitchCase": true}], | ||
"brace-style": [2, "1tbs", {"allowSingleLine": true}], | ||
"comma-style": [2, "last"], | ||
"consistent-this": [2, "self"], | ||
"consistent-return": 0, | ||
"curly": [2, "multi-line"], | ||
"new-cap": [2, {"newIsCap": true, "capIsNew": false}], | ||
"quote-props": [2, "as-needed"], | ||
"quotes": [2, "single", "avoid-escape"], | ||
"space-after-function-name": [2, "never"], | ||
"space-after-keywords": [2, "always"], | ||
"space-before-blocks": [2, "always"], | ||
"space-in-brackets": [2, "never"], | ||
"space-in-parens": [2, "never"], | ||
"spaced-line-comment": [2, "always"], | ||
"yoda": [2, "never"], | ||
|
||
"no-var": 2, | ||
"generator-star": [2, "start"] | ||
} | ||
} |
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,4 +1,3 @@ | ||
/node_modules/ | ||
/Gruntfile.js | ||
/test/tests.js | ||
/test/tests-compiled.js | ||
/lib/ |
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,8 +1,8 @@ | ||
/node_modules/ | ||
/Gruntfile.coffee | ||
/gulpfile.js | ||
/test/ | ||
/vendor/ | ||
/bower.json | ||
/coffeelint.json | ||
/.eslintrc | ||
/src/ | ||
/standalone/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import gulp from 'gulp'; | ||
import gutil from 'gulp-util'; | ||
import babel from 'gulp-babel'; | ||
import browserify from 'gulp-browserify'; | ||
import rename from 'gulp-rename'; | ||
import connect from 'gulp-connect'; | ||
import gbump from 'gulp-bump'; | ||
|
||
|
||
gulp.task('watch', function() { | ||
gulp.watch('./src/**/*', ['build']); | ||
gulp.watch('./test/**/*', ['build:tests']); | ||
}); | ||
|
||
function bump(type) { | ||
gulp.src(['./bower.json', './package.json']) | ||
.pipe(gbump({type})) | ||
.pipe(gulp.dest('./')); | ||
} | ||
|
||
gulp.task('bump:major', () => { bump('major'); }); | ||
gulp.task('bump:minor', () => { bump('minor'); }); | ||
gulp.task('bump:patch', () => { bump('patch'); }); | ||
|
||
gulp.task('build:node', () => { | ||
gulp.src('./src/*.js') | ||
.pipe(babel().on('error', gutil.log)) | ||
.pipe(gulp.dest('./lib')); | ||
}); | ||
|
||
gulp.task('build:browser', ['build:node'], () => { | ||
gulp.src('./lib/*.js') | ||
.pipe(browserify({ | ||
standalone: 'ControllablesMixin', | ||
transform: ['browserify-shim'], | ||
})) | ||
.pipe(rename('react-controllables.js')) | ||
.pipe(gulp.dest('./standalone/')); | ||
}); | ||
|
||
gulp.task('build:tests', () => { | ||
gulp.src('./test/tests.js') | ||
.pipe(babel().on('error', gutil.log)) | ||
.pipe(browserify({ | ||
transform: ['browserify-shim'], | ||
})) | ||
.pipe(rename('tests-compiled.js')) | ||
.pipe(gulp.dest('./test/')); | ||
}); | ||
|
||
gulp.task('testserver', connect.server({ | ||
root: [__dirname], | ||
port: 1337, | ||
open: { | ||
file: 'test/index.html', | ||
browser: 'Google Chrome', | ||
}, | ||
})); | ||
|
||
gulp.task('test', ['build:browser', 'build:tests', 'testserver']); | ||
|
||
gulp.task('build', ['build:node', 'build:browser']); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
// A shim for loading the CoffeeScript gulpfile | ||
require('coffee-script/register'); | ||
require('./gulpfile.coffee'); | ||
require('babel/register'); | ||
module.exports = require('./gulpfile.babel.js'); |
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.
Oops, something went wrong.