Bump prettify dependencies and port our code to the new version
This commit is contained in:
32
gulpfile.js
32
gulpfile.js
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
var gulp = require('gulp');
|
var gulp = require('gulp');
|
||||||
var prettify = require('gulp-jsbeautifier');
|
var prettify = require('gulp-jsbeautifier');
|
||||||
|
var diff = require('gulp-diff');
|
||||||
var babel = require('gulp-babel');
|
var babel = require('gulp-babel');
|
||||||
var webpack = require('webpack-stream');
|
var webpack = require('webpack-stream');
|
||||||
var named = require('vinyl-named');
|
var named = require('vinyl-named');
|
||||||
@@ -25,32 +26,41 @@ gulp.task('prettify:verify', ['prettify:sources:verify', 'prettify:jsx:verify'])
|
|||||||
|
|
||||||
var prettify_options = {
|
var prettify_options = {
|
||||||
html: {
|
html: {
|
||||||
eol: '\n',
|
indent_size: 2,
|
||||||
indentSize: 2
|
end_with_newline: true
|
||||||
},
|
},
|
||||||
css: {
|
css: {
|
||||||
eol: '\n',
|
indent_size: 2,
|
||||||
indentSize: 2
|
end_with_newline: true
|
||||||
},
|
},
|
||||||
js: {
|
js: {
|
||||||
eol: '\n',
|
indent_size: 2,
|
||||||
indentSize: 2,
|
brace_style: "end-expand",
|
||||||
braceStyle: "end-expand"
|
end_with_newline: true
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
gulp.task('prettify:sources', ['sync-meta'], function() {
|
gulp.task('prettify:sources', ['sync-meta'], function() {
|
||||||
prettify_options.mode = "VERIFY_AND_WRITE";
|
|
||||||
return gulp.src(sources)
|
return gulp.src(sources)
|
||||||
.pipe(prettify(prettify_options))
|
.pipe(prettify(prettify_options))
|
||||||
|
.pipe(prettify.reporter())
|
||||||
|
.pipe(diff())
|
||||||
|
.pipe(diff.reporter({
|
||||||
|
quiet: true,
|
||||||
|
fail: false
|
||||||
|
}))
|
||||||
.pipe(gulp.dest('.'));
|
.pipe(gulp.dest('.'));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('prettify:sources:verify', function() {
|
gulp.task('prettify:sources:verify', function() {
|
||||||
prettify_options.mode = "VERIFY_ONLY";
|
|
||||||
prettify_options.showDiff = false;
|
|
||||||
return gulp.src(sources)
|
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-prebuilt": "1.2.7",
|
||||||
"electron-winstaller": "^2.2.0",
|
"electron-winstaller": "^2.2.0",
|
||||||
"esformatter": "^0.9.6",
|
"esformatter": "^0.9.6",
|
||||||
"esformatter-jsx": "^5.0.0",
|
"esformatter-jsx": "^7.0.1",
|
||||||
"gulp": "^3.9.1",
|
"gulp": "^3.9.1",
|
||||||
"gulp-babel": "^6.1.2",
|
"gulp-babel": "^6.1.2",
|
||||||
"gulp-changed": "^1.3.2",
|
"gulp-changed": "^1.3.2",
|
||||||
|
"gulp-diff": "^1.0.0",
|
||||||
"gulp-esformatter": "^6.0.0",
|
"gulp-esformatter": "^6.0.0",
|
||||||
"gulp-jsbeautifier": "^1.0.1",
|
"gulp-jsbeautifier": "^2.0.3",
|
||||||
"json-loader": "^0.5.4",
|
"json-loader": "^0.5.4",
|
||||||
"mocha": "^2.3.4",
|
"mocha": "^2.3.4",
|
||||||
"mocha-circleci-reporter": "0.0.2",
|
"mocha-circleci-reporter": "0.0.2",
|
||||||
"spectron": "~3.2.0",
|
|
||||||
"rimraf": "^2.5.4",
|
"rimraf": "^2.5.4",
|
||||||
|
"spectron": "~3.2.0",
|
||||||
"style-loader": "^0.13.1",
|
"style-loader": "^0.13.1",
|
||||||
"through2": "^2.0.1",
|
"through2": "^2.0.1",
|
||||||
"vinyl-named": "^1.1.0",
|
"vinyl-named": "^1.1.0",
|
||||||
|
Reference in New Issue
Block a user