From 2d9e8956a17c1a6cefcce4c4e17dd24f3e3c0982 Mon Sep 17 00:00:00 2001 From: Wes Cossick Date: Tue, 3 Nov 2015 11:37:00 -0600 Subject: [PATCH 01/13] REAMDE use double quotes --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3f91314..96f2a42 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ var simplemde = new SimpleMDE({ }, spellChecker: false, status: false, - status: ['autosave', 'lines', 'words', 'cursor'], // Optional usage + status: ["autosave", "lines", "words", "cursor"], // Optional usage tabSize: 4, toolbar: false, toolbarTips: false, From dbf8f15e34357c3cf7479980a53a0ffd862ad341 Mon Sep 17 00:00:00 2001 From: Wes Cossick Date: Tue, 3 Nov 2015 14:26:28 -0600 Subject: [PATCH 02/13] Create .travis.yml --- .travis.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..9c376fb --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +node_js: + - "stable" +before_script: + - npm install -g gulp +script: gulp From 4e1d01bcb76ab08cef880cbaf2bc2550c2feb175 Mon Sep 17 00:00:00 2001 From: Wes Cossick Date: Tue, 3 Nov 2015 14:31:30 -0600 Subject: [PATCH 03/13] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9c376fb..40b4c5c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: node_js node_js: - - "stable" + - "0.12.7" before_script: - npm install -g gulp script: gulp From a9c100fe6ccc8a4e5b3b764f14d62b8d81f6bc7a Mon Sep 17 00:00:00 2001 From: Wes Cossick Date: Tue, 3 Nov 2015 14:41:17 -0600 Subject: [PATCH 04/13] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 40b4c5c..9c376fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: node_js node_js: - - "0.12.7" + - "stable" before_script: - npm install -g gulp script: gulp From 804427835b986856ca9a44a544dfd3eb8591e15b Mon Sep 17 00:00:00 2001 From: Wes Cossick Date: Tue, 3 Nov 2015 14:45:51 -0600 Subject: [PATCH 05/13] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9c376fb..55a07ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: node_js node_js: - - "stable" + - "0.12" # TODO: change to stable soon when resolved: https://github.com/tracker1/gulp-header/issues/23 before_script: - npm install -g gulp script: gulp From 2c77d032e6064503660b5ec958bbc7b1290abfb5 Mon Sep 17 00:00:00 2001 From: Wes Cossick Date: Tue, 3 Nov 2015 14:46:23 -0600 Subject: [PATCH 06/13] Force lint error to test Travis CI --- src/js/simplemde.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/simplemde.js b/src/js/simplemde.js index 9e1c584..17c9380 100644 --- a/src/js/simplemde.js +++ b/src/js/simplemde.js @@ -15,7 +15,7 @@ var marked = require("marked"); var isMac = /Mac/.test(navigator.platform); var shortcuts = { - "Cmd-B": toggleBold, + 'Cmd-B': toggleBold, "Cmd-I": toggleItalic, "Cmd-K": drawLink, "Cmd-H": toggleHeadingSmaller, From 08fc75b9092f31fc9ef427efadee5f3582683f77 Mon Sep 17 00:00:00 2001 From: Wes Cossick Date: Tue, 3 Nov 2015 14:54:29 -0600 Subject: [PATCH 07/13] Gulp should fail after lint error --- gulpfile.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 3b22d8f..5c54b53 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -37,7 +37,8 @@ gulp.task("lint", ["prettify-js"], function() { gulp.src("./src/js/**/*.js") .pipe(debug()) .pipe(eslint()) - .pipe(eslint.format()); + .pipe(eslint.format()) + .pipe(eslint.failAfterError()); }); function taskBrowserify(opts) { @@ -87,4 +88,4 @@ gulp.task("styles", ["prettify-css"], function() { .pipe(gulp.dest("./dist/")); }); -gulp.task("default", ["scripts", "styles"]); \ No newline at end of file +gulp.task("default", ["scripts", "styles"]); From adda6665c1eeab6d87946f150ed85cf417739f42 Mon Sep 17 00:00:00 2001 From: Wes Cossick Date: Tue, 3 Nov 2015 15:07:39 -0600 Subject: [PATCH 08/13] Update simplemde.js --- src/js/simplemde.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/simplemde.js b/src/js/simplemde.js index 9853891..d193911 100644 --- a/src/js/simplemde.js +++ b/src/js/simplemde.js @@ -15,7 +15,7 @@ var marked = require("marked"); var isMac = /Mac/.test(navigator.platform); var shortcuts = { - 'Cmd-B': toggleBold, + "Cmd-B": toggleBold, "Cmd-I": toggleItalic, "Cmd-K": drawLink, "Cmd-H": toggleHeadingSmaller, From e42b85304de3f64b2700638acbf054605168fc92 Mon Sep 17 00:00:00 2001 From: Wes Cossick Date: Tue, 3 Nov 2015 15:28:30 -0600 Subject: [PATCH 09/13] Auto deploy to npm --- .travis.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 55a07ac..09ceb72 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,15 @@ language: node_js node_js: - - "0.12" # TODO: change to stable soon when resolved: https://github.com/tracker1/gulp-header/issues/23 +- '0.12' before_script: - - npm install -g gulp +- npm install -g gulp script: gulp +deploy: + provider: npm + email: support@nextstepwebs.com + api_key: + secure: nADZupyOhJAhTQgr5uOIydbDEjCTAj+3nGHW7ZBJUrVJcb0uR4pg8ngmwrUpvaCeNXgKPG9Uag75/mPcBre9ly2cigBIG9LHlxImlF8qi1jRJykcNRmBb9N2MJJj+zdAMwLaF5Ns+f2v3zt97qxovbEzunhXGcZeCaxc6y40nDM8OTyo0PESNBjQYqaNblt2gO2KHysrwFL8i4kCCKLa+HOBLu2iqgk/fYVqTmfhEeOiiwQ4lIXJeyPyzgb3OPhKCMV1FI5H0T48fRD0MPczt8ds3Daj1OjCbIZurQ7s1dcKwz1g6TKATN59HcMsSarW4lImrEeYmfQxz2F5NjKDRhnith5V0W2IssrkpDG9teTFQ20eQdl5cpnlGjgBvsjb8GhPLR44GvefyJL4+kJGI3O1KVq3/7wbmu/IXrvhtKHEQSdGL2PTqW8QxKasAoUCnk3LGZKN12g8bg0xDg2tvoCUk5Z3asHLRdCJpDbBq1h8QfZ4HV5VLYjr84xduOUZbEUtfMVAixPpJ4h1E3OXJ1wil97BlHjxOZ8JkkxJg5lgSUZ/O/QWwJokEAYXR9c+ouMoVokChAyleV77cRZ5qLn9zbnUxZtnKX8w0IUKeu95/z8QgiaRcERKVCpZvceo8Qw0Y+JoiEtno7Zg/nsrZGxsS6K/V3yg1QQmT3bjDHQ= + on: + tags: true + repo: NextStepWebs/simplemde-markdown-editor + branch: production From e295645d93b3eeb27d3d0c6012cb8f402d131bd2 Mon Sep 17 00:00:00 2001 From: Wes Cossick Date: Tue, 3 Nov 2015 15:48:54 -0600 Subject: [PATCH 10/13] Document Travis CI requirement --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b7133b4..c03cccf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,6 +3,7 @@ First of all, thanks for your interest in helping make SimpleMDE even better. Co ### Guidelines for contributing - The *most important* guideline for contributing is to compare against the `development` branch when creating a pull request. This allows time to test and modify code changes before merging them into the stable master branch with the next release. +- Travis CI is configured to build and verify all PRs. If your PR causes the build to fail, please add an additional commit that resolves any problems. - If you really want to earn some brownie points, create a JSFiddle that demonstrates your code changes. Seriously, this helps immensely and allows one or multiple people to easily provide feedback on the great work you've done. - When creating the JSFiddle, keep in mind that you can use http://rawgit.com for your files. - Do your best to fully test your changes. Anticipate edge-case behavior. From becd1317ff180e9804fb36fdd252bb27e6bcbde8 Mon Sep 17 00:00:00 2001 From: Wes Cossick Date: Tue, 3 Nov 2015 22:01:40 -0600 Subject: [PATCH 11/13] Trigger Travis CI build with small change --- src/js/simplemde.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/js/simplemde.js b/src/js/simplemde.js index d193911..e05b31b 100644 --- a/src/js/simplemde.js +++ b/src/js/simplemde.js @@ -12,6 +12,7 @@ require("spell-checker"); var marked = require("marked"); +// Some variables var isMac = /Mac/.test(navigator.platform); var shortcuts = { From 06454332badc580a5ec16eabc38e7f84c5c7fc0c Mon Sep 17 00:00:00 2001 From: Wes Cossick Date: Tue, 3 Nov 2015 22:07:44 -0600 Subject: [PATCH 12/13] Format Travis file properly --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 09ceb72..7f26b67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,8 @@ deploy: provider: npm email: support@nextstepwebs.com api_key: - secure: nADZupyOhJAhTQgr5uOIydbDEjCTAj+3nGHW7ZBJUrVJcb0uR4pg8ngmwrUpvaCeNXgKPG9Uag75/mPcBre9ly2cigBIG9LHlxImlF8qi1jRJykcNRmBb9N2MJJj+zdAMwLaF5Ns+f2v3zt97qxovbEzunhXGcZeCaxc6y40nDM8OTyo0PESNBjQYqaNblt2gO2KHysrwFL8i4kCCKLa+HOBLu2iqgk/fYVqTmfhEeOiiwQ4lIXJeyPyzgb3OPhKCMV1FI5H0T48fRD0MPczt8ds3Daj1OjCbIZurQ7s1dcKwz1g6TKATN59HcMsSarW4lImrEeYmfQxz2F5NjKDRhnith5V0W2IssrkpDG9teTFQ20eQdl5cpnlGjgBvsjb8GhPLR44GvefyJL4+kJGI3O1KVq3/7wbmu/IXrvhtKHEQSdGL2PTqW8QxKasAoUCnk3LGZKN12g8bg0xDg2tvoCUk5Z3asHLRdCJpDbBq1h8QfZ4HV5VLYjr84xduOUZbEUtfMVAixPpJ4h1E3OXJ1wil97BlHjxOZ8JkkxJg5lgSUZ/O/QWwJokEAYXR9c+ouMoVokChAyleV77cRZ5qLn9zbnUxZtnKX8w0IUKeu95/z8QgiaRcERKVCpZvceo8Qw0Y+JoiEtno7Zg/nsrZGxsS6K/V3yg1QQmT3bjDHQ= + secure: nADZupyOhJAhTQgr5uOIydbDEjCTAj+3nGHW7ZBJUrVJcb0uR4pg8ngmwrUpvaCeNXgKPG9Uag75/mPcBre9ly2cigBIG9LHlxImlF8qi1jRJykcNRmBb9N2MJJj+zdAMwLaF5Ns+f2v3zt97qxovbEzunhXGcZeCaxc6y40nDM8OTyo0PESNBjQYqaNblt2gO2KHysrwFL8i4kCCKLa+HOBLu2iqgk/fYVqTmfhEeOiiwQ4lIXJeyPyzgb3OPhKCMV1FI5H0T48fRD0MPczt8ds3Daj1OjCbIZurQ7s1dcKwz1g6TKATN59HcMsSarW4lImrEeYmfQxz2F5NjKDRhnith5V0W2IssrkpDG9teTFQ20eQdl5cpnlGjgBvsjb8GhPLR44GvefyJL4+kJGI3O1KVq3/7wbmu/IXrvhtKHEQSdGL2PTqW8QxKasAoUCnk3LGZKN12g8bg0xDg2tvoCUk5Z3asHLRdCJpDbBq1h8QfZ4HV5VLYjr84xduOUZbEUtfMVAixPpJ4h1E3OXJ1wil97BlHjxOZ8JkkxJg5lgSUZ/O/QWwJokEAYXR9c+ouMoVokChAyleV77cRZ5qLn9zbnUxZtnKX8w0IUKeu95/z8QgiaRcERKVCpZvceo8Qw0Y+JoiEtno7Zg/nsrZGxsS6K/V3yg1QQmT3bjDHQ= on: - tags: true - repo: NextStepWebs/simplemde-markdown-editor - branch: production + tags: true + repo: NextStepWebs/simplemde-markdown-editor + branch: production From 69e65ac0d155adccf985761ede8cc9256c6b6de4 Mon Sep 17 00:00:00 2001 From: Wes Cossick Date: Tue, 3 Nov 2015 22:24:28 -0600 Subject: [PATCH 13/13] Make autosave option more clear --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 96f2a42..d1922e6 100644 --- a/README.md +++ b/README.md @@ -69,10 +69,10 @@ simplemde.value("This text will appear in the editor"); - **autoDownloadFontAwesome**: If set to `true`, force downloads Font Awesome (used for icons). If set to false, prevents downloading. Defaults to `undefined`, which will intelligently check whether Font Awesome has already been included, then download accordingly. - **autofocus**: If set to `true`, autofocuses the editor. Defaults to `false`. -- **autosave**: *Saves the text that's being written. It will forget the text when the form is submitted.* +- **autosave**: *Saves the text that's being written and will load it back in the future. It will forget the text when the form it's contained in is submitted.* - **enabled**: If set to `true`, autosave the text. Defaults to `false`. - **delay**: Delay between saves, in milliseconds. Defaults to `10000` (10s). - - **unique_id**: You must set a unique identifier so that SimpleMDE can autosave. Something that separates this from other textareas. + - **unique_id**: You must set a unique string identifier so that SimpleMDE can autosave. Something that separates this from other instances of SimpleMDE elsewhere on your website. - **element**: The DOM element for the textarea to use. Defaults to the first textarea on the page. - **hideIcons**: An array of icon names to hide. Can be used to hide specific icons without completely customizing the toolbar. - **indentWithTabs**: If set to `false`, indent using spaces instead of tabs. Defaults to `true`.