diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..6da8f49 --- /dev/null +++ b/.babelrc @@ -0,0 +1,6 @@ +{ + "presets": ["es2015"], + "plugins": [ + "add-module-exports" + ] +} diff --git a/.gitignore b/.gitignore index 6edd850..a569b2f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /node_modules npm-debug.log +/coverage diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..494f845 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +# faster builds on new travis setup not using sudo +sudo: false + +language: node_js + +node_js: + - "5.8" + +before_script: + - 'export CHROME_BIN=chromium-browser' + - 'export DISPLAY=:99.0' + - 'sh -e /etc/init.d/xvfb start' + - npm install + +cache: + directories: + - node_modules diff --git a/README.md b/README.md index 208ec3a..50665ab 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![Build Status](https://travis-ci.org/dazorni/medium-editor-autofocus.svg?branch=master)](https://travis-ci.org/dazorni/medium-editor-autofocus) # medium-editor-autofocus Autofocus for the medium editor @@ -5,3 +6,20 @@ Autofocus for the medium editor ## Description This is an extension for the [medium-editor](https://github.com/yabwe/medium-editor). For better user experience it will autofocus the medium-editor at start. + +## Build dist files + +Compile the es2015 module + +``` +npm run build + +// npm run build:dev +// npm run build:prod +``` + +## Run tests + +``` +npm run test +``` diff --git a/demo/autofocus.html b/demo/autofocus.html index 37d095c..955259a 100644 --- a/demo/autofocus.html +++ b/demo/autofocus.html @@ -16,7 +16,7 @@

Gangsta Ispum

- +