Mottie / Keyboard

Virtual Keyboard using jQuery ~
http://mottie.github.io/Keyboard/
Other
1.78k stars 723 forks source link

Import extensions using npm #621

Closed Judahh closed 6 years ago

Judahh commented 6 years ago

How can I import Typing and extender using the npm package? because this does not work: import { KeyboardOptions, Typing, Extender } from 'virtual-keyboard';

Mottie commented 6 years ago

Hi @Judahh!

Hmm, I'm not sure that import would work since the code isn't using export, unless Babel handles that for you... Anyway, to include the extensions, you'll need to point to the files within the node_modules folder. Something like this:

var jquery = require("jquery");
var virtualKeyboard = require("virtual-keyboard");
var typing = require("./node_modules/virtual-keyboard/dist/js/jquery.keyboard.extension-typing.min.js");
var extender = require("./node_modules/virtual-keyboard/dist/js/jquery.keyboard.extension-extender.min.js");
Mottie commented 6 years ago

I'm guessing this issue has been resolved, so I'm going to close it. If you continue to have problems, please feel free to continue the discussion in this thread.