vue-inject-js

1.0.0 • Public • Published

Vue Inject Js

Inject Remote Js For Vue.js 2.

npm npm npm GitHub pull requests GitHub stars

Installation

Select one option:

  1. Install using npm
npm install vue-inject-js --save

You can omit the --save option if using npm@^5.

You can also use Yarn as:

yarn add vue-inject-js

In your JavaScript file:

import VueInjectJs from 'vue-inject-js'

- or -

var VueInjectJs = require('vue-inject-js')
  1. Embed script tag
<script src="https://unpkg.com/vue-inject-js/dist/vue-inject-js.min.js"></script>

Then register the component into Vue:

Vue.use(VueInjectJs)

Documentation

Using Inject Js is easy. The HTML code you need is the following:

<VueInjectJs src="https://unpkg.com/jquery@3.2.1/dist/jquery.js"/>

And no JS code is needed whatsoever, Inject Js works out of the box.

Props

The component needs some configuration, though. It's only one required option, so it remains pretty simple.

Prop Description Type Default
src Remote Javascript source that will be loaded. String required

Check out changelog file.

License

MIT

Contribution

Questions

Feel free to contact me or create an issue

made with ♥

Package Sidebar

Install

npm i vue-inject-js

Weekly Downloads

219

Version

1.0.0

License

MIT

Last publish

Collaborators

  • simman