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

bower installation #8

Closed
PavelPolyakov opened this issue Oct 3, 2015 · 1 comment
Closed

bower installation #8

PavelPolyakov opened this issue Oct 3, 2015 · 1 comment

Comments

@PavelPolyakov
Copy link

Hi,

Could someone, please, clarify for me the way Vue plugins should be connected to the framework.

1.
If I use vueify (and I use it), I can use vue-i18n in the next way:

// ready translated locales
var locales = {
    'en-US': {
        message: {
            hello: 'the world'
        }
    }
}

// set plugins
// vue-i18n
Vue.use(require('vue-i18n'), {
    lang: 'en-US',
    locales: locales
});
// vue-router
Vue.use(require('vue-router'));
// vue-resource
Vue.use(require('vue-resource'));
// -- end of the plugins setup

Then, after my project will be "vueified", my target app.js would have vue-i18n library's code inside.
It has no sense anymore, to connect it in index.html directly, like:

<script src="/app/vendor/bower_modules/vue-i18n/dist/vue-i18n.js"></script>

2.
But what if I want to connect this plugin from index.html, not using vueify.
What should I do then ? What should I write to the

Vue.use(***, {
    lang: 'en-US',
    locales: locales
});

under which variable, the plugin is exposed if it's connected via front-end? Should I ever use it this way?
I found vue-i18n/example/bower/index.html , but it is missing the index.js file.

Regards,

@PavelPolyakov
Copy link
Author

**ck, I was searching the bower downloaded version of the library.
While the real example is here:
https://github.com/kazupon/vue-i18n/tree/master/example/bower

Regards,

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

1 participant