mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-23 09:54:28 -06:00
* Update gulp to version 4
* Added Windows/Linux shortcuts to documentation * Drop Node 4 testing * Added Node 10 testing * Updated packages
This commit is contained in:
parent
fd1665d012
commit
e8e2a0cd2a
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@ node_modules/
|
|||||||
*.ipr
|
*.ipr
|
||||||
*.iws
|
*.iws
|
||||||
.idea/
|
.idea/
|
||||||
|
.vscode/
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
language: node_js
|
language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
- '9'
|
- '10'
|
||||||
- '8'
|
- '8'
|
||||||
- '6'
|
- '6'
|
||||||
- '4'
|
|
||||||
before_script:
|
before_script:
|
||||||
- npm install -g gulp
|
- npm install -g gulp
|
||||||
script: gulp
|
script: gulp
|
||||||
|
34
README.md
34
README.md
@ -8,7 +8,7 @@ Changes include:
|
|||||||
* Guide button works when editor is in preview mode
|
* Guide button works when editor is in preview mode
|
||||||
* Links are now `https://` by default
|
* Links are now `https://` by default
|
||||||
* Small styling changes
|
* Small styling changes
|
||||||
* Node 8 and Node 9 support
|
* Support for Node 8 and beyond
|
||||||
* Lots of refactored code
|
* Lots of refactored code
|
||||||
|
|
||||||
My intention is to continue development on this project, improving it and keeping it alive.
|
My intention is to continue development on this project, improving it and keeping it alive.
|
||||||
@ -328,22 +328,22 @@ var simplemde = new SimpleMDE({
|
|||||||
|
|
||||||
SimpleMDE comes with an array of predefined keyboard shortcuts, but they can be altered with a configuration option. The list of default ones is as follows:
|
SimpleMDE comes with an array of predefined keyboard shortcuts, but they can be altered with a configuration option. The list of default ones is as follows:
|
||||||
|
|
||||||
Shortcut | Action
|
Shortcut (Windows / Linux) | Shortcut (macOS) | Action
|
||||||
:------- | :-----
|
:--- | :--- | :---
|
||||||
*Cmd-'* | "toggleBlockquote"
|
*Ctrl-'* | *Cmd-'* | "toggleBlockquote"
|
||||||
*Cmd-B* | "toggleBold"
|
*Ctrl-B* | *Cmd-B* | "toggleBold"
|
||||||
*Cmd-E* | "cleanBlock"
|
*Ctrl-E* | *Cmd-E* | "cleanBlock"
|
||||||
*Cmd-H* | "toggleHeadingSmaller"
|
*Ctrl-H* | *Cmd-H* | "toggleHeadingSmaller"
|
||||||
*Cmd-I* | "toggleItalic"
|
*Ctrl-I* | *Cmd-I* | "toggleItalic"
|
||||||
*Cmd-K* | "drawLink"
|
*Ctrl-K* | *Cmd-K* | "drawLink"
|
||||||
*Cmd-L* | "toggleUnorderedList"
|
*Ctrl-L* | *Cmd-L* | "toggleUnorderedList"
|
||||||
*Cmd-P* | "togglePreview"
|
*Ctrl-P* | *Cmd-P* | "togglePreview"
|
||||||
*Cmd-Alt-C* | "toggleCodeBlock"
|
*Ctrl-Alt-C* | *Cmd-Alt-C* | "toggleCodeBlock"
|
||||||
*Cmd-Alt-I* | "drawImage"
|
*Ctrl-Alt-I* | *Cmd-Alt-I* | "drawImage"
|
||||||
*Cmd-Alt-L* | "toggleOrderedList"
|
*Ctrl-Alt-L* | *Cmd-Alt-L* | "toggleOrderedList"
|
||||||
*Shift-Cmd-H* | "toggleHeadingBigger"
|
*Shift-Ctrl-H* | *Shift-Cmd-H* | "toggleHeadingBigger"
|
||||||
*F9* | "toggleSideBySide"
|
*F9* | *F9* | "toggleSideBySide"
|
||||||
*F11* | "toggleFullScreen"
|
*F11* | *F11* | "toggleFullScreen"
|
||||||
|
|
||||||
Here is how you can change a few, while leaving others untouched:
|
Here is how you can change a few, while leaving others untouched:
|
||||||
|
|
||||||
|
2
dist/easymde.min.css
vendored
2
dist/easymde.min.css
vendored
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* easymde v1.0.0
|
* easymde v2.0.0
|
||||||
* Copyright Jeroen Akkerman
|
* Copyright Jeroen Akkerman
|
||||||
* @link https://github.com/ionaru/easy-markdown-editor
|
* @link https://github.com/ionaru/easy-markdown-editor
|
||||||
* @license MIT
|
* @license MIT
|
||||||
|
4
dist/easymde.min.js
vendored
4
dist/easymde.min.js
vendored
File diff suppressed because one or more lines are too long
40
gulpfile.js
40
gulpfile.js
@ -1,16 +1,16 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var gulp = require('gulp'),
|
var gulp = require('gulp');
|
||||||
minifycss = require('gulp-clean-css'),
|
var minifycss = require('gulp-clean-css');
|
||||||
uglify = require('gulp-uglify'),
|
var uglify = require('gulp-uglify');
|
||||||
concat = require('gulp-concat'),
|
var concat = require('gulp-concat');
|
||||||
header = require('gulp-header'),
|
var header = require('gulp-header');
|
||||||
buffer = require('vinyl-buffer'),
|
var buffer = require('vinyl-buffer');
|
||||||
pkg = require('./package.json'),
|
var pkg = require('./package.json');
|
||||||
eslint = require('gulp-eslint'),
|
var eslint = require('gulp-eslint');
|
||||||
browserify = require('browserify'),
|
var browserify = require('browserify');
|
||||||
source = require('vinyl-source-stream'),
|
var source = require('vinyl-source-stream');
|
||||||
rename = require('gulp-rename');
|
var rename = require('gulp-rename');
|
||||||
|
|
||||||
var banner = ['/**',
|
var banner = ['/**',
|
||||||
' * <%= pkg.name %> v<%= pkg.version %>',
|
' * <%= pkg.name %> v<%= pkg.version %>',
|
||||||
@ -20,23 +20,23 @@ var banner = ['/**',
|
|||||||
' */',
|
' */',
|
||||||
''].join('\n');
|
''].join('\n');
|
||||||
|
|
||||||
gulp.task('lint', function () {
|
function lint() {
|
||||||
gulp.src('./src/js/**/*.js')
|
return gulp.src('./src/js/**/*.js')
|
||||||
.pipe(eslint())
|
.pipe(eslint())
|
||||||
.pipe(eslint.format())
|
.pipe(eslint.format())
|
||||||
.pipe(eslint.failAfterError());
|
.pipe(eslint.failAfterError());
|
||||||
});
|
}
|
||||||
|
|
||||||
gulp.task('scripts', ['lint'], function () {
|
function scripts() {
|
||||||
return browserify({entries: './src/js/easymde.js', standalone: 'EasyMDE'}).bundle()
|
return browserify({entries: './src/js/easymde.js', standalone: 'EasyMDE'}).bundle()
|
||||||
.pipe(source('easymde.min.js'))
|
.pipe(source('easymde.min.js'))
|
||||||
.pipe(buffer())
|
.pipe(buffer())
|
||||||
.pipe(uglify())
|
.pipe(uglify())
|
||||||
.pipe(header(banner, {pkg: pkg}))
|
.pipe(header(banner, {pkg: pkg}))
|
||||||
.pipe(gulp.dest('./dist/'));
|
.pipe(gulp.dest('./dist/'));
|
||||||
});
|
}
|
||||||
|
|
||||||
gulp.task('styles', function () {
|
function styles() {
|
||||||
var css_files = [
|
var css_files = [
|
||||||
'./node_modules/codemirror/lib/codemirror.css',
|
'./node_modules/codemirror/lib/codemirror.css',
|
||||||
'./src/css/*.css',
|
'./src/css/*.css',
|
||||||
@ -50,6 +50,8 @@ gulp.task('styles', function () {
|
|||||||
.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']);
|
var build = gulp.parallel(gulp.series(lint, scripts), styles);
|
||||||
|
|
||||||
|
gulp.task('default', build);
|
||||||
|
3989
package-lock.json
generated
3989
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -21,9 +21,9 @@
|
|||||||
"marked": "0.3.19"
|
"marked": "0.3.19"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"browserify": "^16.2.0",
|
"browserify": "^16.2.2",
|
||||||
"gulp": "^3.9.1",
|
"gulp": "^4.0.0",
|
||||||
"gulp-clean-css": "^3.9.0",
|
"gulp-clean-css": "^3.9.4",
|
||||||
"gulp-concat": "^2.6.1",
|
"gulp-concat": "^2.6.1",
|
||||||
"gulp-eslint": "^4.0.0",
|
"gulp-eslint": "^4.0.0",
|
||||||
"gulp-header": "^2.0.5",
|
"gulp-header": "^2.0.5",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user