diff --git a/examples/index.js b/examples/index.js index e91679de..ee55a08a 100644 --- a/examples/index.js +++ b/examples/index.js @@ -1,6 +1,6 @@ import Prism from 'prismjs' -import Editable from '../src/core' +import {Editable} from '../src/core' import eventList from './events.js' // Paragraph Example diff --git a/package.json b/package.json index 82afd624..818f5d59 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "editable" ], "license": "MIT", - "main": "lib/core.js", + "module": "src/core.js", "repository": { "type": "git", "url": "https://github.com/livingdocsIO/editable.js.git" @@ -67,8 +67,7 @@ "start": "WEBPACK_DEV=true BUILD_DOCS=true webpack serve", "build:dist": "rimraf ./coverage && BUILD_DIST=true webpack", "build:docs": "rimraf ./examples/dist && BUILD_DOCS=true webpack", - "build:lib": "rimraf ./{lib,coverage} && babel src --out-dir lib", - "build": "npm run build:dist -s && npm run build:lib -s && npm run build:docs -s", + "build": "npm run build:dist -s && npm run build:docs -s", "test:ci": "npm run test:karma -s", "test": "npm run build -s && npm run test:karma -s", "posttest": "npm run lint -s", diff --git a/spec/api.spec.js b/spec/api.spec.js index 6ff9b8f5..ba098432 100644 --- a/spec/api.spec.js +++ b/spec/api.spec.js @@ -1,4 +1,4 @@ -import Editable from '../src/core' +import {Editable} from '../src/core' describe('Editable', function () { let editable, div diff --git a/spec/config.spec.js b/spec/config.spec.js index 0f69b2b4..53a51660 100644 --- a/spec/config.spec.js +++ b/spec/config.spec.js @@ -1,6 +1,6 @@ import cloneDeep from 'lodash.clonedeep' import config from '../src/config' -import Editable from '../src/core' +import {Editable} from '../src/core' describe('Editable configuration', function () { diff --git a/spec/create-default-events.spec.js b/spec/create-default-events.spec.js index 0de80ab0..3a2f977e 100644 --- a/spec/create-default-events.spec.js +++ b/spec/create-default-events.spec.js @@ -1,7 +1,7 @@ import rangy from 'rangy' import Cursor from '../src/cursor' -import Editable from '../src/core' +import {Editable} from '../src/core' describe('Default Events', function () { diff --git a/spec/dispatcher.spec.js b/spec/dispatcher.spec.js index 993784b7..374abc29 100644 --- a/spec/dispatcher.spec.js +++ b/spec/dispatcher.spec.js @@ -3,7 +3,7 @@ import rangy from 'rangy' import * as content from '../src/content' import Cursor from '../src/cursor' import Keyboard from '../src/keyboard' -import Editable from '../src/core' +import {Editable} from '../src/core' import Selection from '../src/selection' const {key} = Keyboard diff --git a/spec/highlighting.spec.js b/spec/highlighting.spec.js index 0ddb7e43..957d209f 100644 --- a/spec/highlighting.spec.js +++ b/spec/highlighting.spec.js @@ -1,5 +1,5 @@ import rangy from 'rangy' -import Editable from '../src/core' +import {Editable} from '../src/core' import Highlighting from '../src/highlighting' import highlightSupport from '../src/highlight-support' import WordHighlighter from '../src/plugins/highlighting/text-highlighting' diff --git a/spec/spellcheck.spec.js b/spec/spellcheck.spec.js index 944f3f73..46a8c677 100644 --- a/spec/spellcheck.spec.js +++ b/spec/spellcheck.spec.js @@ -1,7 +1,7 @@ import rangy from 'rangy' import sinon from 'sinon' -import Editable from '../src/core' +import {Editable} from '../src/core' import Highlighting from '../src/highlighting' import Cursor from '../src/cursor' import {createElement} from '../src/util/dom' diff --git a/src/core.js b/src/core.js index 9dec83a9..54abda33 100644 --- a/src/core.js +++ b/src/core.js @@ -35,7 +35,7 @@ import {domArray} from './util/dom' * * @class Editable */ -export default class Editable { +export class Editable { constructor (instanceConfig) { const defaultInstanceConfig = { diff --git a/webpack.config.js b/webpack.config.js index 0db4800a..e7e2eb57 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -24,7 +24,7 @@ module.exports = { output: { library: dist ? 'Editable' : undefined, libraryTarget: 'umd', - libraryExport: 'default', + libraryExport: 'Editable', path: __dirname, filename: '[name].js' },