Minor changes

pull/510/head
WittBulter 8 years ago
parent 3303ecd4ab
commit ee0350ec77

@ -21,19 +21,26 @@ const banner = `/**
* @license <%= pkg.license %> * @license <%= pkg.license %>
*/\n` */\n`
gulp.task("prettify-js", [], function() { gulp.task("prettify-js", [], () =>{
return gulp.src("./src/js/simplemde.js") return gulp.src("./src/js/simplemde.js")
.pipe(prettify({js: {brace_style: "collapse", indent_char: "\t", indent_size: 1, max_preserve_newlines: 3, space_before_conditional: false}})) .pipe(prettify({
js: {
brace_style: "collapse",
indent_char: "\t",
indent_size: 1,
max_preserve_newlines: 3,
space_before_conditional: false
}}))
.pipe(gulp.dest("./src/js")); .pipe(gulp.dest("./src/js"));
}); });
gulp.task("prettify-css", [], function() { gulp.task("prettify-css", [], () =>{
return gulp.src("./src/css/simplemde.css") return gulp.src("./src/css/simplemde.css")
.pipe(prettify({css: {indentChar: "\t", indentSize: 1}})) .pipe(prettify({css: {indentChar: "\t", indentSize: 1}}))
.pipe(gulp.dest("./src/css")); .pipe(gulp.dest("./src/css"));
}); });
gulp.task("lint", ["prettify-js"], function() { gulp.task("lint", ["prettify-js"], () =>{
gulp.src("./src/js/**/*.js") gulp.src("./src/js/**/*.js")
.pipe(debug()) .pipe(debug())
.pipe(eslint()) .pipe(eslint())
@ -47,7 +54,7 @@ function taskBrowserify(opts) {
.bundle(); .bundle();
} }
gulp.task("browserify:debug", ["lint"], function() { gulp.task("browserify:debug", ["lint"], () =>{
return taskBrowserify({debug:true, standalone:"SimpleMDE"}) return taskBrowserify({debug:true, standalone:"SimpleMDE"})
.pipe(source("simplemde.debug.js")) .pipe(source("simplemde.debug.js"))
.pipe(buffer()) .pipe(buffer())
@ -55,7 +62,7 @@ gulp.task("browserify:debug", ["lint"], function() {
.pipe(gulp.dest("./debug/")); .pipe(gulp.dest("./debug/"));
}); });
gulp.task("browserify", ["lint"], function() { gulp.task("browserify", ["lint"], () =>{
return taskBrowserify({standalone:"SimpleMDE"}) return taskBrowserify({standalone:"SimpleMDE"})
.pipe(source("simplemde.js")) .pipe(source("simplemde.js"))
.pipe(buffer()) .pipe(buffer())
@ -63,8 +70,8 @@ gulp.task("browserify", ["lint"], function() {
.pipe(gulp.dest("./debug/")); .pipe(gulp.dest("./debug/"));
}); });
gulp.task("scripts", ["browserify:debug", "browserify", "lint"], function() { gulp.task("scripts", ["browserify:debug", "browserify", "lint"], () =>{
var js_files = ["./debug/simplemde.js"]; const js_files = ["./debug/simplemde.js"];
return gulp.src(js_files) return gulp.src(js_files)
.pipe(concat("simplemde.min.js")) .pipe(concat("simplemde.min.js"))
@ -74,8 +81,8 @@ gulp.task("scripts", ["browserify:debug", "browserify", "lint"], function() {
.pipe(gulp.dest("./dist/")); .pipe(gulp.dest("./dist/"));
}); });
gulp.task("styles", ["prettify-css"], function() { gulp.task("styles", ["prettify-css"], () =>{
var css_files = [ const css_files = [
"./node_modules/codemirror/lib/codemirror.css", "./node_modules/codemirror/lib/codemirror.css",
"./src/css/*.css", "./src/css/*.css",
"./node_modules/codemirror-spell-checker/src/css/spell-checker.css" "./node_modules/codemirror-spell-checker/src/css/spell-checker.css"

Loading…
Cancel
Save