Procházet zdrojové kódy

Use single quotes

tags/2.0.0
Jeroen Akkerman před 1 rokem
rodič
revize
70236ba68e
6 změnil soubory, kde provedl 1275 přidání a 1275 odebrání
  1. 3
    3
      .eslintrc
  2. 410
    410
      debug/simplemde.debug.js
  3. 409
    409
      debug/simplemde.js
  4. 44
    44
      gulpfile.js
  5. 7
    7
      src/js/codemirror/tablist.js
  6. 402
    402
      src/js/simplemde.js

+ 3
- 3
.eslintrc Zobrazit soubor

@@ -3,11 +3,11 @@
3 3
         "strict": 0,
4 4
         "no-console": 0,
5 5
         "quotes": [
6
-            2,
7
-            "double"
6
+            "error",
7
+            "single"
8 8
         ],
9 9
         "semi": [
10
-            2,
10
+            "error",
11 11
             "always"
12 12
         ]
13 13
     },

+ 410
- 410
debug/simplemde.debug.js
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 409
- 409
debug/simplemde.js
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 44
- 44
gulpfile.js Zobrazit soubor

@@ -1,28 +1,28 @@
1
-"use strict";
1
+'use strict';
2 2
 
3
-var gulp = require("gulp"),
4
-    minifycss = require("gulp-clean-css"),
5
-    uglify = require("gulp-uglify"),
6
-    concat = require("gulp-concat"),
7
-    header = require("gulp-header"),
8
-    buffer = require("vinyl-buffer"),
9
-    pkg = require("./package.json"),
10
-    debug = require("gulp-debug"),
11
-    eslint = require("gulp-eslint"),
12
-    browserify = require("browserify"),
13
-    source = require("vinyl-source-stream"),
14
-    rename = require("gulp-rename");
3
+var gulp = require('gulp'),
4
+    minifycss = require('gulp-clean-css'),
5
+    uglify = require('gulp-uglify'),
6
+    concat = require('gulp-concat'),
7
+    header = require('gulp-header'),
8
+    buffer = require('vinyl-buffer'),
9
+    pkg = require('./package.json'),
10
+    debug = require('gulp-debug'),
11
+    eslint = require('gulp-eslint'),
12
+    browserify = require('browserify'),
13
+    source = require('vinyl-source-stream'),
14
+    rename = require('gulp-rename');
15 15
 
16
-var banner = ["/**",
17
-    " * <%= pkg.name %> v<%= pkg.version %>",
18
-    " * Copyright <%= pkg.author %>",
19
-    " * @link <%= pkg.repository.url %>",
20
-    " * @license <%= pkg.license %>",
21
-    " */",
22
-    ""].join("\n");
16
+var banner = ['/**',
17
+    ' * <%= pkg.name %> v<%= pkg.version %>',
18
+    ' * Copyright <%= pkg.author %>',
19
+    ' * @link <%= pkg.repository.url %>',
20
+    ' * @license <%= pkg.license %>',
21
+    ' */',
22
+    ''].join('\n');
23 23
 
24
-gulp.task("lint", function () {
25
-    gulp.src("./src/js/**/*.js")
24
+gulp.task('lint', function () {
25
+    gulp.src('./src/js/**/*.js')
26 26
         .pipe(debug())
27 27
         .pipe(eslint())
28 28
         .pipe(eslint.format())
@@ -30,54 +30,54 @@ gulp.task("lint", function () {
30 30
 });
31 31
 
32 32
 function taskBrowserify(opts) {
33
-    return browserify("./src/js/simplemde.js", opts)
33
+    return browserify('./src/js/simplemde.js', opts)
34 34
         .bundle();
35 35
 }
36 36
 
37
-gulp.task("browserify:debug", ["lint"], function () {
38
-    return taskBrowserify({debug: true, standalone: "SimpleMDE"})
39
-        .pipe(source("simplemde.debug.js"))
37
+gulp.task('browserify:debug', ['lint'], function () {
38
+    return taskBrowserify({debug: true, standalone: 'SimpleMDE'})
39
+        .pipe(source('simplemde.debug.js'))
40 40
         .pipe(buffer())
41 41
         .pipe(header(banner, {pkg: pkg}))
42
-        .pipe(gulp.dest("./debug/"));
42
+        .pipe(gulp.dest('./debug/'));
43 43
 });
44 44
 
45
-gulp.task("browserify", ["lint"], function () {
46
-    return taskBrowserify({standalone: "SimpleMDE"})
47
-        .pipe(source("simplemde.js"))
45
+gulp.task('browserify', ['lint'], function () {
46
+    return taskBrowserify({standalone: 'SimpleMDE'})
47
+        .pipe(source('simplemde.js'))
48 48
         .pipe(buffer())
49 49
         .pipe(header(banner, {pkg: pkg}))
50
-        .pipe(gulp.dest("./debug/"));
50
+        .pipe(gulp.dest('./debug/'));
51 51
 });
52 52
 
53
-gulp.task("scripts", ["browserify:debug", "browserify", "lint"], function () {
54
-    var js_files = ["./debug/simplemde.js"];
53
+gulp.task('scripts', ['browserify:debug', 'browserify', 'lint'], function () {
54
+    var js_files = ['./debug/simplemde.js'];
55 55
 
56 56
     return gulp.src(js_files)
57
-        .pipe(concat("simplemde.min.js"))
57
+        .pipe(concat('simplemde.min.js'))
58 58
         .pipe(uglify())
59 59
         .pipe(buffer())
60 60
         .pipe(header(banner, {pkg: pkg}))
61
-        .pipe(gulp.dest("./dist/"));
61
+        .pipe(gulp.dest('./dist/'));
62 62
 });
63 63
 
64
-gulp.task("styles", function () {
64
+gulp.task('styles', function () {
65 65
     var css_files = [
66
-        "./node_modules/codemirror/lib/codemirror.css",
67
-        "./src/css/*.css",
68
-        "./node_modules/codemirror-spell-checker/src/css/spell-checker.css"
66
+        './node_modules/codemirror/lib/codemirror.css',
67
+        './src/css/*.css',
68
+        './node_modules/codemirror-spell-checker/src/css/spell-checker.css'
69 69
     ];
70 70
 
71 71
     return gulp.src(css_files)
72
-        .pipe(concat("simplemde.css"))
72
+        .pipe(concat('simplemde.css'))
73 73
         .pipe(buffer())
74 74
         .pipe(header(banner, {pkg: pkg}))
75
-        .pipe(gulp.dest("./debug/"))
75
+        .pipe(gulp.dest('./debug/'))
76 76
         .pipe(minifycss())
77
-        .pipe(rename("simplemde.min.css"))
77
+        .pipe(rename('simplemde.min.css'))
78 78
         .pipe(buffer())
79 79
         .pipe(header(banner, {pkg: pkg}))
80
-        .pipe(gulp.dest("./dist/"));
80
+        .pipe(gulp.dest('./dist/'));
81 81
 });
82 82
 
83
-gulp.task("default", ["scripts", "styles"]);
83
+gulp.task('default', ['scripts', 'styles']);

+ 7
- 7
src/js/codemirror/tablist.js Zobrazit soubor

@@ -1,7 +1,7 @@
1 1
 // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 2
 // Distributed under an MIT license: http://codemirror.net/LICENSE
3 3
 
4
-var CodeMirror = require("codemirror");
4
+var CodeMirror = require('codemirror');
5 5
 
6 6
 CodeMirror.commands.tabAndIndentMarkdownList = function (cm) {
7 7
     var ranges = cm.listSelections();
@@ -10,15 +10,15 @@ CodeMirror.commands.tabAndIndentMarkdownList = function (cm) {
10 10
     var inList = eolState.list !== false;
11 11
 
12 12
     if (inList) {
13
-        cm.execCommand("indentMore");
13
+        cm.execCommand('indentMore');
14 14
         return;
15 15
     }
16 16
 
17 17
     if (cm.options.indentWithTabs) {
18
-        cm.execCommand("insertTab");
18
+        cm.execCommand('insertTab');
19 19
     }
20 20
     else {
21
-        var spaces = Array(cm.options.tabSize + 1).join(" ");
21
+        var spaces = Array(cm.options.tabSize + 1).join(' ');
22 22
         cm.replaceSelection(spaces);
23 23
     }
24 24
 };
@@ -30,15 +30,15 @@ CodeMirror.commands.shiftTabAndUnindentMarkdownList = function (cm) {
30 30
     var inList = eolState.list !== false;
31 31
 
32 32
     if (inList) {
33
-        cm.execCommand("indentLess");
33
+        cm.execCommand('indentLess');
34 34
         return;
35 35
     }
36 36
 
37 37
     if (cm.options.indentWithTabs) {
38
-        cm.execCommand("insertTab");
38
+        cm.execCommand('insertTab');
39 39
     }
40 40
     else {
41
-        var spaces = Array(cm.options.tabSize + 1).join(" ");
41
+        var spaces = Array(cm.options.tabSize + 1).join(' ');
42 42
         cm.replaceSelection(spaces);
43 43
     }
44 44
 };

+ 402
- 402
src/js/simplemde.js
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


Načítá se…
Zrušit
Uložit