Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using the NPM version with require #111

Open
denizdogan opened this issue Aug 8, 2016 · 2 comments
Open

Using the NPM version with require #111

denizdogan opened this issue Aug 8, 2016 · 2 comments
Milestone

Comments

@denizdogan
Copy link

What's the proper way to use the version that's published on NPM?

> require('slippry')
Error: Cannot find module 'slippry'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at repl:1:1
    at REPLServer.defaultEval (repl.js:262:27)
    at bound (domain.js:287:14)
    at REPLServer.runBound [as eval] (domain.js:300:12)
    at REPLServer.<anonymous> (repl.js:431:12)
    at emitOne (events.js:82:20)
@sftsk
Copy link
Member

sftsk commented Sep 26, 2016

This is not possible at the moment, Slippry will only work as a jQuery plugin. npm is only used to make it easier to install in different build environment :(

This is high on our list of ideas for the next big Slippry update,

@sftsk sftsk added this to the 2.0 milestone Sep 26, 2016
@yuzhva
Copy link

yuzhva commented Mar 7, 2017

@denizdogan
require('slippry/dist/slippry.min.js');

@sftsk
just add next line to package.json
"main": "./dist/slippry.min.js",

So when the devs would use require('slippry'); syntax it would import **slippry.min.js ** file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants