Comments (12)
Sure, I can do that. I should probably refactor things a bit to bring it more up to date, but for now I'll see if I can't just get a package definition pushed and get it up on npmjs.com.
from keys.js.
Thanks @bitwalker, much appreciated!
from keys.js.
Done! https://www.npmjs.com/package/keys.js
from keys.js.
@bitwalker How do you require keys?
I've tried these, no luck
require('keys.js');
require('keys');
from keys.js.
@jamesfzhang Let me take a look, it should just work. Are you using ES6/2015-style require/import, or require.js/some variant?
from keys.js.
I'm using ES6 style via https://github.com/browserify-rails/browserify-rails
from keys.js.
@jamesfzhang cool, I'll take a look and get back to you soon
from keys.js.
@jamesfzhang Found the issue, I can now require the script in Node, so it should work with browserify.
You can do either:
var Keys = require('keys.js');
// or
import {Key, Combo, Bindings} from 'keys.js';
Let me know if you are still running into problems!
from keys.js.
@bitwalker I still can't seem to require it via browserify-rails. I suspect it might be related to the .
in the library name? If I move the src file from node_modules
into my assets pipeline, I can require it relatively. That'll do for now, thanks!
from keys.js.
Hmm, I wouldn't think so as there are quite a few libs with the something.js
naming scheme, perhaps I'm missing something else. I'll try and find some time to play with it in browserify.
from keys.js.
@jamesfzhang I found the problem, I needed to add main
to my package.json file. Just did a quick test and it appears to be working properly now. Let me know if you are still having trouble (published a new version 1.0.2 btw).
from keys.js.
@bitwalker Works perfectly now, thanks a lot! Cheers.
from keys.js.
Related Issues (6)
- Demo page HOT 13
- Simple bootstrap problem
- CC BY-SA might be a bad idea HOT 3
- bower support? HOT 4
- webpack support? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keys.js.