mirror of
https://github.com/sparksuite/simplemde-markdown-editor.git
synced 2024-05-05 07:23:18 +02:00
Clean up build process, Use new CodeMirror Spell Checker
This commit is contained in:
parent
dbb1c25843
commit
c8f23a3aa9
|
@ -58,7 +58,7 @@
|
||||||
}
|
}
|
||||||
.cm-fat-cursor .CodeMirror-cursor {
|
.cm-fat-cursor .CodeMirror-cursor {
|
||||||
width: auto;
|
width: auto;
|
||||||
border: 0;
|
border: 0 !important;
|
||||||
background: #7e7;
|
background: #7e7;
|
||||||
}
|
}
|
||||||
.cm-fat-cursor div.CodeMirror-cursors {
|
.cm-fat-cursor div.CodeMirror-cursors {
|
||||||
|
@ -672,5 +672,5 @@ span.CodeMirror-selectedtext { background: none; }
|
||||||
opacity: .5;
|
opacity: .5;
|
||||||
}
|
}
|
||||||
.CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word) {
|
.CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word) {
|
||||||
background: rgba(255, 0, 0, .15);
|
background: rgba(255, 0, 0, .15);
|
||||||
}
|
}
|
File diff suppressed because one or more lines are too long
2532
debug/simplemde.js
2532
debug/simplemde.js
File diff suppressed because it is too large
Load diff
2
dist/simplemde.min.css
vendored
2
dist/simplemde.min.css
vendored
File diff suppressed because one or more lines are too long
17
dist/simplemde.min.js
vendored
17
dist/simplemde.min.js
vendored
File diff suppressed because one or more lines are too long
19
gulpfile.js
19
gulpfile.js
|
@ -1,6 +1,7 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var gulp = require("gulp"),
|
var gulp = require("gulp"),
|
||||||
minifycss = require("gulp-minify-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"),
|
||||||
|
@ -8,11 +9,10 @@ var gulp = require("gulp"),
|
||||||
pkg = require("./package.json"),
|
pkg = require("./package.json"),
|
||||||
debug = require("gulp-debug"),
|
debug = require("gulp-debug"),
|
||||||
eslint = require("gulp-eslint"),
|
eslint = require("gulp-eslint"),
|
||||||
prettify = require("gulp-jsbeautifier");
|
prettify = require("gulp-jsbeautifier"),
|
||||||
var browserify = require("browserify");
|
browserify = require("browserify"),
|
||||||
var source = require("vinyl-source-stream");
|
source = require("vinyl-source-stream"),
|
||||||
var rename = require("gulp-rename");
|
rename = require("gulp-rename");
|
||||||
|
|
||||||
|
|
||||||
var banner = ["/**",
|
var banner = ["/**",
|
||||||
" * <%= pkg.name %> v<%= pkg.version %>",
|
" * <%= pkg.name %> v<%= pkg.version %>",
|
||||||
|
@ -45,10 +45,9 @@ gulp.task("lint", ["prettify-js"], 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:dev", ["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())
|
||||||
|
@ -56,7 +55,7 @@ gulp.task("browserify:dev", ["lint"], function() {
|
||||||
.pipe(gulp.dest("./debug/"));
|
.pipe(gulp.dest("./debug/"));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task("browserify:min", ["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())
|
||||||
|
@ -64,7 +63,7 @@ gulp.task("browserify:min", ["lint"], function() {
|
||||||
.pipe(gulp.dest("./debug/"));
|
.pipe(gulp.dest("./debug/"));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task("scripts", ["browserify:dev", "browserify:min", "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)
|
||||||
|
|
37
package.json
37
package.json
|
@ -21,47 +21,26 @@
|
||||||
"url": "https://github.com/NextStepWebs/simplemde-markdown-editor/issues"
|
"url": "https://github.com/NextStepWebs/simplemde-markdown-editor/issues"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"codemirror": "codemirror/CodeMirror",
|
"codemirror": "*",
|
||||||
"codemirror-spell-checker": "nextstepwebs/codemirror-spell-checker",
|
"codemirror-spell-checker": "*",
|
||||||
"marked": "0.3.5"
|
"marked": "*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"browserify": "^11.2.0",
|
"browserify": "*",
|
||||||
"browserify-shim": "^3.8.10",
|
"debug": "*",
|
||||||
"debug": "^2.2.0",
|
|
||||||
"eslint": "*",
|
"eslint": "*",
|
||||||
"gulp": "*",
|
"gulp": "*",
|
||||||
"gulp-concat": "*",
|
"gulp-concat": "*",
|
||||||
"gulp-debug": "^2.1.1",
|
"gulp-debug": "*",
|
||||||
"gulp-eslint": "*",
|
"gulp-eslint": "*",
|
||||||
"gulp-header": "*",
|
"gulp-header": "*",
|
||||||
"gulp-jsbeautifier": "*",
|
"gulp-jsbeautifier": "*",
|
||||||
"gulp-minify-css": "^1.2.1",
|
"gulp-clean-css": "*",
|
||||||
"gulp-rename": "^1.2.2",
|
"gulp-rename": "*",
|
||||||
"gulp-uglify": "*",
|
"gulp-uglify": "*",
|
||||||
"vinyl-source-stream": "*",
|
"vinyl-source-stream": "*",
|
||||||
"vinyl-buffer": "*"
|
"vinyl-buffer": "*"
|
||||||
},
|
},
|
||||||
"browserify": {
|
|
||||||
"transform": [
|
|
||||||
"browserify-shim"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"browser": {
|
|
||||||
"spell-checker": "codemirror-spell-checker/src/js/spell-checker.js",
|
|
||||||
"typo": "codemirror-spell-checker/src/js/typo.js"
|
|
||||||
},
|
|
||||||
"browserify-shim": {
|
|
||||||
"spell-checker": {
|
|
||||||
"depends": [
|
|
||||||
"typo:Typo",
|
|
||||||
"codemirror:CodeMirror"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"typo": {
|
|
||||||
"exports": "Typo"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/NextStepWebs/simplemde-markdown-editor"
|
"url": "https://github.com/NextStepWebs/simplemde-markdown-editor"
|
||||||
|
|
|
@ -10,7 +10,7 @@ require("codemirror/addon/display/placeholder.js");
|
||||||
require("codemirror/addon/selection/mark-selection.js");
|
require("codemirror/addon/selection/mark-selection.js");
|
||||||
require("codemirror/mode/gfm/gfm.js");
|
require("codemirror/mode/gfm/gfm.js");
|
||||||
require("codemirror/mode/xml/xml.js");
|
require("codemirror/mode/xml/xml.js");
|
||||||
require("spell-checker");
|
var CodeMirrorSpellChecker = require("codemirror-spell-checker");
|
||||||
var marked = require("marked");
|
var marked = require("marked");
|
||||||
|
|
||||||
|
|
||||||
|
@ -1466,6 +1466,10 @@ SimpleMDE.prototype.render = function(el) {
|
||||||
backdrop = options.parsingConfig;
|
backdrop = options.parsingConfig;
|
||||||
backdrop.name = "gfm";
|
backdrop.name = "gfm";
|
||||||
backdrop.gitHubSpice = false;
|
backdrop.gitHubSpice = false;
|
||||||
|
|
||||||
|
CodeMirrorSpellChecker({
|
||||||
|
codeMirrorInstance: CodeMirror
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
mode = options.parsingConfig;
|
mode = options.parsingConfig;
|
||||||
mode.name = "gfm";
|
mode.name = "gfm";
|
||||||
|
|
Loading…
Reference in a new issue