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

instantiating globally #7

Closed
ha404 opened this issue Jan 30, 2018 · 1 comment
Closed

instantiating globally #7

ha404 opened this issue Jan 30, 2018 · 1 comment

Comments

@ha404
Copy link
Contributor

ha404 commented Jan 30, 2018

Hi there! I was wondering if this was a good approach to instantiating and using this globally?

Instantiate:

import root from 'window-or-global'
import Shevy from 'shevyjs'

export default root.shevy = root.shevy || new Shevy()

Use:

import shevy from 'path/to/shevy'

const { content } = shevy
@kyleshevlin
Copy link
Owner

This is more a general JavaScript question than one particular to this library. Feel free to instantiate Shevy however you see fit. 👍

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

No branches or pull requests

2 participants