Skip to content

Commit

Permalink
Merge pull request #46 from NextStepWebs/development
Browse files Browse the repository at this point in the history
Restructure to use gulp.js, Value improvements, Fix bugs
  • Loading branch information
WesCossick committed Aug 11, 2015
2 parents 4d6194b + c196726 commit 343b4a8
Show file tree
Hide file tree
Showing 23 changed files with 222 additions and 160 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
localtesting/*
localtesting/*
node_modules/
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ simplemde.value();
- **lineWrapping**: If set to `false`, disable line wrapping. Defaults to `true`.
- **indentWithTabs**: If set to `false`, indent using spaces instead of tabs. Defaults to `true`.
- **tabSize**: If set, customize the tab size. Defaults to `2`.
- **initialValue**: If set, will customize the initial value of the editor.
- **spellChecker**: If set to `false`, disable the spell checker. Defaults to `true`.
- **autosave**: *Saves the text that's being written. It will forget the text when the form is submitted.*
- **enabled**: If set to `true`, autosave the text. Defaults to `false`.
Expand All @@ -73,10 +74,14 @@ var simplemde = new SimpleMDE({
status: false,
status: ['autosave', 'lines', 'words', 'cursor'], // Optional usage
toolbar: false,
toolbarTips: false,
toolbarGuideIcon: false,
autofocus: true,
lineWrapping: false,
indentWithTabs: false,
tabSize: 4,
initialValue: "Hello world!",
spellChecker: false,
autosave: {
enabled: true,
unique_id: "MyUniqueID",
Expand Down
7 changes: 7 additions & 0 deletions dist/simplemde.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions dist/simplemde.min.js

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
var gulp = require('gulp'),
minifycss = require('gulp-minify-css'),
uglify = require('gulp-uglify'),
concat = require('gulp-concat'),
header = require('gulp-header'),
pkg = require('./package.json');

var banner = ['/**',
' * <%= pkg.name %> v<%= pkg.version %>',
' * Copyright <%= pkg.company %>',
' * @link <%= pkg.homepage %>',
' * @license <%= pkg.license %>',
' */',
''].join('\n');

gulp.task('scripts', function() {
var js_files = [
'./src/js/codemirror/codemirror.js',
'./src/js/codemirror/continuelist.js',
'./src/js/codemirror/fullscreen.js',
'./src/js/codemirror/markdown.js',
'./src/js/codemirror/overlay.js',
'./src/js/codemirror/gfm.js',
'./src/js/codemirror/xml.js',
'./src/js/typo.js',
'./src/js/spell-checker.js',
'./src/js/marked.js',
'./src/js/simplemde.js'];

return gulp.src(js_files)
.pipe(header(banner, {pkg: pkg}))
.pipe(concat('simplemde.min.js'))
.pipe(gulp.dest('dist'))
.pipe(uglify())
.pipe(header(banner, {pkg: pkg}))
.pipe(gulp.dest('dist'));
});

gulp.task('styles', function() {
return gulp.src('./src/css/*.css')
.pipe(concat('simplemde.min.css'))
.pipe(gulp.dest('dist'))
.pipe(minifycss())
.pipe(header(banner, {pkg: pkg}))
.pipe(gulp.dest('dist'));
});

gulp.task('default', ['scripts', 'styles']);
28 changes: 28 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "simplemde",
"version": "1.5.1",
"description": "A simple, beautiful, and embeddable JavaScript markdown editor. Features autosaving and spell checking.",
"keywords": ["embeddable", "markdown", "editor", "javascript", "wysiwyg"],
"homepage": "https://github.com/NextStepWebs/simplemde-markdown-editor",
"main": "gulpfile.js",
"license": "MIT",
"company": "Next Step Webs, Inc.",
"author": {
"name": "Wes Cossick",
"url": "http://www.WesCossick.com"
},
"bugs": {
"url": "https://github.com/NextStepWebs/simplemde-markdown-editor/issues"
},
"dependencies": {
"gulp": "*",
"gulp-minify-css": "*",
"gulp-uglify": "*",
"gulp-concat": "*",
"gulp-header": "*"
},
"repository": {
"type": "git",
"url": "https://github.com/NextStepWebs/simplemde-markdown-editor"
}
}
7 changes: 0 additions & 7 deletions simplemde.min.css

This file was deleted.

13 changes: 0 additions & 13 deletions simplemde.min.js

This file was deleted.

Loading

0 comments on commit 343b4a8

Please sign in to comment.