Merge pull request #255 from Razzeee/bump-prettify
Bump prettify dependencies and apply prettification
This commit is contained in:
9
.gitattributes
vendored
Normal file
9
.gitattributes
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
# Set the default behavior, in case people don't have core.autocrlf set.
|
||||
* text=auto
|
||||
|
||||
# Set our files to use lf, so our prettify will always be happy
|
||||
*.html text eol=lf
|
||||
*.css text eol=lf
|
||||
*.js text eol=lf
|
||||
*.jsx text eol=lf
|
||||
*.json text eol=lf
|
32
gulpfile.js
32
gulpfile.js
@@ -2,6 +2,7 @@
|
||||
|
||||
var gulp = require('gulp');
|
||||
var prettify = require('gulp-jsbeautifier');
|
||||
var diff = require('gulp-diff');
|
||||
var babel = require('gulp-babel');
|
||||
var webpack = require('webpack-stream');
|
||||
var named = require('vinyl-named');
|
||||
@@ -25,32 +26,41 @@ gulp.task('prettify:verify', ['prettify:sources:verify', 'prettify:jsx:verify'])
|
||||
|
||||
var prettify_options = {
|
||||
html: {
|
||||
eol: '\n',
|
||||
indentSize: 2
|
||||
indent_size: 2,
|
||||
end_with_newline: true
|
||||
},
|
||||
css: {
|
||||
eol: '\n',
|
||||
indentSize: 2
|
||||
indent_size: 2,
|
||||
end_with_newline: true
|
||||
},
|
||||
js: {
|
||||
eol: '\n',
|
||||
indentSize: 2,
|
||||
braceStyle: "end-expand"
|
||||
indent_size: 2,
|
||||
brace_style: "end-expand",
|
||||
end_with_newline: true
|
||||
}
|
||||
};
|
||||
|
||||
gulp.task('prettify:sources', ['sync-meta'], function() {
|
||||
prettify_options.mode = "VERIFY_AND_WRITE";
|
||||
return gulp.src(sources)
|
||||
.pipe(prettify(prettify_options))
|
||||
.pipe(prettify.reporter())
|
||||
.pipe(diff())
|
||||
.pipe(diff.reporter({
|
||||
quiet: true,
|
||||
fail: false
|
||||
}))
|
||||
.pipe(gulp.dest('.'));
|
||||
});
|
||||
|
||||
gulp.task('prettify:sources:verify', function() {
|
||||
prettify_options.mode = "VERIFY_ONLY";
|
||||
prettify_options.showDiff = false;
|
||||
return gulp.src(sources)
|
||||
.pipe(prettify(prettify_options));
|
||||
.pipe(prettify(prettify_options))
|
||||
.pipe(prettify.reporter())
|
||||
.pipe(diff())
|
||||
.pipe(diff.reporter({
|
||||
quiet: true,
|
||||
fail: true
|
||||
}));
|
||||
});
|
||||
|
||||
|
||||
|
@@ -42,17 +42,18 @@
|
||||
"electron-prebuilt": "1.2.7",
|
||||
"electron-winstaller": "^2.2.0",
|
||||
"esformatter": "^0.9.6",
|
||||
"esformatter-jsx": "^5.0.0",
|
||||
"esformatter-jsx": "^7.0.1",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-babel": "^6.1.2",
|
||||
"gulp-changed": "^1.3.2",
|
||||
"gulp-diff": "^1.0.0",
|
||||
"gulp-esformatter": "^6.0.0",
|
||||
"gulp-jsbeautifier": "^1.0.1",
|
||||
"gulp-jsbeautifier": "^2.0.3",
|
||||
"json-loader": "^0.5.4",
|
||||
"mocha": "^3.0.2",
|
||||
"mocha-circleci-reporter": "0.0.2",
|
||||
"spectron": "~3.2.0",
|
||||
"rimraf": "^2.5.4",
|
||||
"spectron": "~3.2.0",
|
||||
"style-loader": "^0.13.1",
|
||||
"through2": "^2.0.1",
|
||||
"vinyl-named": "^1.1.0",
|
||||
|
@@ -40,7 +40,7 @@ const LoginModal = React.createClass({
|
||||
</p>
|
||||
<Form horizontal onSubmit={ this.handleSubmit }>
|
||||
<FormGroup>
|
||||
<Col componentClass={ ControlLabel } sm={ 2 }>User Name</Col>
|
||||
<Col componentClass={ ControlLabel } sm={ 2 }>User Name</Col>
|
||||
<Col sm={ 10 }>
|
||||
<FormControl type="text" placeholder="User Name" ref="username" />
|
||||
</Col>
|
||||
|
@@ -13,6 +13,7 @@
|
||||
function open_window() {
|
||||
window.open('./test.html');
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
Reference in New Issue
Block a user