diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..7f26b67 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,15 @@ +language: node_js +node_js: +- '0.12' +before_script: +- 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 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. diff --git a/README.md b/README.md index 3f91314..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`. @@ -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, 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"]); 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 = {