Use single quotes

pull/6/head
Jeroen Akkerman 6 years ago
parent de26368ad1
commit 70236ba68e

@ -3,11 +3,11 @@
"strict": 0, "strict": 0,
"no-console": 0, "no-console": 0,
"quotes": [ "quotes": [
2, "error",
"double" "single"
], ],
"semi": [ "semi": [
2, "error",
"always" "always"
] ]
}, },

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -1,28 +1,28 @@
"use strict"; 'use strict';
var gulp = require("gulp"), var gulp = require('gulp'),
minifycss = require("gulp-clean-css"), minifycss = require('gulp-clean-css'),
uglify = require("gulp-uglify"), uglify = require('gulp-uglify'),
concat = require("gulp-concat"), concat = require('gulp-concat'),
header = require("gulp-header"), header = require('gulp-header'),
buffer = require("vinyl-buffer"), buffer = require('vinyl-buffer'),
pkg = require("./package.json"), pkg = require('./package.json'),
debug = require("gulp-debug"), debug = require('gulp-debug'),
eslint = require("gulp-eslint"), eslint = require('gulp-eslint'),
browserify = require("browserify"), browserify = require('browserify'),
source = require("vinyl-source-stream"), source = require('vinyl-source-stream'),
rename = require("gulp-rename"); rename = require('gulp-rename');
var banner = ["/**", var banner = ['/**',
" * <%= pkg.name %> v<%= pkg.version %>", ' * <%= pkg.name %> v<%= pkg.version %>',
" * Copyright <%= pkg.author %>", ' * Copyright <%= pkg.author %>',
" * @link <%= pkg.repository.url %>", ' * @link <%= pkg.repository.url %>',
" * @license <%= pkg.license %>", ' * @license <%= pkg.license %>',
" */", ' */',
""].join("\n"); ''].join('\n');
gulp.task("lint", function () { gulp.task('lint', function () {
gulp.src("./src/js/**/*.js") gulp.src('./src/js/**/*.js')
.pipe(debug()) .pipe(debug())
.pipe(eslint()) .pipe(eslint())
.pipe(eslint.format()) .pipe(eslint.format())
@ -30,54 +30,54 @@ gulp.task("lint", function () {
}); });
function taskBrowserify(opts) { function taskBrowserify(opts) {
return browserify("./src/js/simplemde.js", opts) return browserify('./src/js/simplemde.js', opts)
.bundle(); .bundle();
} }
gulp.task("browserify:debug", ["lint"], function () { gulp.task('browserify:debug', ['lint'], function () {
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())
.pipe(header(banner, {pkg: pkg})) .pipe(header(banner, {pkg: pkg}))
.pipe(gulp.dest("./debug/")); .pipe(gulp.dest('./debug/'));
}); });
gulp.task("browserify", ["lint"], function () { gulp.task('browserify', ['lint'], function () {
return taskBrowserify({standalone: "SimpleMDE"}) return taskBrowserify({standalone: 'SimpleMDE'})
.pipe(source("simplemde.js")) .pipe(source('simplemde.js'))
.pipe(buffer()) .pipe(buffer())
.pipe(header(banner, {pkg: pkg})) .pipe(header(banner, {pkg: pkg}))
.pipe(gulp.dest("./debug/")); .pipe(gulp.dest('./debug/'));
}); });
gulp.task("scripts", ["browserify:debug", "browserify", "lint"], function () { gulp.task('scripts', ['browserify:debug', 'browserify', 'lint'], function () {
var js_files = ["./debug/simplemde.js"]; var 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'))
.pipe(uglify()) .pipe(uglify())
.pipe(buffer()) .pipe(buffer())
.pipe(header(banner, {pkg: pkg})) .pipe(header(banner, {pkg: pkg}))
.pipe(gulp.dest("./dist/")); .pipe(gulp.dest('./dist/'));
}); });
gulp.task("styles", function () { gulp.task('styles', function () {
var css_files = [ var 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'
]; ];
return gulp.src(css_files) return gulp.src(css_files)
.pipe(concat("simplemde.css")) .pipe(concat('simplemde.css'))
.pipe(buffer()) .pipe(buffer())
.pipe(header(banner, {pkg: pkg})) .pipe(header(banner, {pkg: pkg}))
.pipe(gulp.dest("./debug/")) .pipe(gulp.dest('./debug/'))
.pipe(minifycss()) .pipe(minifycss())
.pipe(rename("simplemde.min.css")) .pipe(rename('simplemde.min.css'))
.pipe(buffer()) .pipe(buffer())
.pipe(header(banner, {pkg: pkg})) .pipe(header(banner, {pkg: pkg}))
.pipe(gulp.dest("./dist/")); .pipe(gulp.dest('./dist/'));
}); });
gulp.task("default", ["scripts", "styles"]); gulp.task('default', ['scripts', 'styles']);

@ -1,7 +1,7 @@
// CodeMirror, copyright (c) by Marijn Haverbeke and others // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE // Distributed under an MIT license: http://codemirror.net/LICENSE
var CodeMirror = require("codemirror"); var CodeMirror = require('codemirror');
CodeMirror.commands.tabAndIndentMarkdownList = function (cm) { CodeMirror.commands.tabAndIndentMarkdownList = function (cm) {
var ranges = cm.listSelections(); var ranges = cm.listSelections();
@ -10,15 +10,15 @@ CodeMirror.commands.tabAndIndentMarkdownList = function (cm) {
var inList = eolState.list !== false; var inList = eolState.list !== false;
if (inList) { if (inList) {
cm.execCommand("indentMore"); cm.execCommand('indentMore');
return; return;
} }
if (cm.options.indentWithTabs) { if (cm.options.indentWithTabs) {
cm.execCommand("insertTab"); cm.execCommand('insertTab');
} }
else { else {
var spaces = Array(cm.options.tabSize + 1).join(" "); var spaces = Array(cm.options.tabSize + 1).join(' ');
cm.replaceSelection(spaces); cm.replaceSelection(spaces);
} }
}; };
@ -30,15 +30,15 @@ CodeMirror.commands.shiftTabAndUnindentMarkdownList = function (cm) {
var inList = eolState.list !== false; var inList = eolState.list !== false;
if (inList) { if (inList) {
cm.execCommand("indentLess"); cm.execCommand('indentLess');
return; return;
} }
if (cm.options.indentWithTabs) { if (cm.options.indentWithTabs) {
cm.execCommand("insertTab"); cm.execCommand('insertTab');
} }
else { else {
var spaces = Array(cm.options.tabSize + 1).join(" "); var spaces = Array(cm.options.tabSize + 1).join(' ');
cm.replaceSelection(spaces); cm.replaceSelection(spaces);
} }
}; };

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save