Skip to content

Commit 17ef083

Browse files
committed
Initial commit.
0 parents  commit 17ef083

14 files changed

+5276
-0
lines changed

.babelrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"presets": [
3+
["env", { "modules": false }],
4+
"stage-2"
5+
],
6+
"plugins": ["transform-runtime"],
7+
"env": {
8+
"test": {
9+
"presets": ["env", "stage-2"]
10+
}
11+
}
12+
}

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
insert_final_newline = true
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
trim_trailing_whitespace = true

.gitignore

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
# Logs
5+
logs
6+
*.log
7+
npm-debug.log*
8+
yarn-debug.log*
9+
yarn-error.log*
10+
11+
# Runtime data
12+
pids
13+
*.pid
14+
*.seed
15+
*.pid.lock
16+
17+
# Directory for instrumented libs generated by jscoverage/JSCover
18+
lib-cov
19+
20+
# Coverage directory used by tools like istanbul
21+
coverage
22+
23+
# nyc test coverage
24+
.nyc_output
25+
26+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
27+
.grunt
28+
29+
# Bower dependency directory (https://bower.io/)
30+
bower_components
31+
32+
# node-waf configuration
33+
.lock-wscript
34+
35+
# Compiled binary addons (http://nodejs.org/api/addons.html)
36+
build/Release
37+
38+
# Dependency directories
39+
node_modules/
40+
jspm_packages/
41+
42+
# Typescript v1 declaration files
43+
typings/
44+
45+
# Optional npm cache directory
46+
.npm
47+
48+
# Optional eslint cache
49+
.eslintcache
50+
51+
# Optional REPL history
52+
.node_repl_history
53+
54+
# Output of 'npm pack'
55+
*.tgz
56+
57+
# Yarn Integrity file
58+
.yarn-integrity
59+
60+
# dotenv environment variables file
61+
.env

.npmignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
# OSX
3+
#
4+
.DS_Store
5+
6+
# node.js
7+
#
8+
node_modules/
9+
npm-debug.log
10+
yarn-error.log
11+
12+
webpack.config.js
13+
yarn.lock

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## v1.0.0
2+
3+
Initial release.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2017 rnkit.io
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Vue Inject Js
2+
3+
Inject Remote Js For Vue.js 2.
4+
5+
[![npm](https://img.shields.io/npm/dm/vue-inject-js.svg)](https://www.npmjs.com/package/vue-inject-js)
6+
[![npm](https://img.shields.io/npm/v/vue-inject-js.svg)](https://www.npmjs.com/package/vue-inject-js)
7+
[![npm](https://img.shields.io/npm/l/vue-inject-js.svg)](https://www.npmjs.com/package/vue-inject-js)
8+
[![GitHub pull requests](https://img.shields.io/badge/PR-welcome-green.svg)]()
9+
[![GitHub stars](https://img.shields.io/github/stars/rnkit/vue-inject-js.svg?style=social&label=Star)]()
10+
11+
## Installation
12+
13+
Select one option:
14+
15+
1. Install using **npm**
16+
17+
```sh
18+
npm install vue-inject-js --save
19+
```
20+
You can omit the `--save` option if using `npm@^5`.
21+
22+
You can also use Yarn as:
23+
24+
```sh
25+
yarn add vue-inject-js
26+
```
27+
28+
In your JavaScript file:
29+
30+
```js
31+
import VueInjectJs from 'vue-inject-js'
32+
```
33+
34+
\- or -
35+
36+
```js
37+
var VueInjectJs = require('vue-inject-js')
38+
```
39+
40+
2. Embed script tag
41+
42+
```html
43+
<script src="https://unpkg.com/vue-inject-js/dist/vue-inject-js.min.js"></script>
44+
```
45+
46+
Then register the component into Vue:
47+
48+
```js
49+
Vue.use(VueInjectJs)
50+
```
51+
52+
## Documentation
53+
54+
Using Inject Js is easy. The HTML code you need is the following:
55+
56+
```html
57+
<VueInjectJs src="https://unpkg.com/[email protected]/dist/jquery.js"/>
58+
```
59+
60+
And no JS code is needed whatsoever, Inject Js works out of the box.
61+
62+
### Props
63+
64+
The component needs some configuration, though. It's only one required option, so it remains pretty simple.
65+
66+
| Prop | Description | Type | Default |
67+
|------|-------------|------|---------|
68+
| src | Remote Javascript source that will be loaded. | String | _required_ |
69+
70+
71+
Check out [changelog](CHANGELOG.md) file.
72+
73+
## License
74+
75+
[MIT](http://opensource.org/licenses/MIT)
76+
77+
## Contribution
78+
79+
- [@simamn](mailto:[email protected]) The main author.
80+
81+
## Questions
82+
83+
Feel free to [contact me](mailto:[email protected]) or [create an issue](https://github.com/rnkit/vue-inject-js/issues/new)
84+
85+
> made with ♥

dist/vue-inject-js.min.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue-inject-js.min.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"name": "vue-inject-js",
3+
"version": "1.0.0",
4+
"description": "Inject Remote Js For Vue.js",
5+
"keywords": [
6+
"vue",
7+
"vuejs",
8+
"inject",
9+
"injectjs",
10+
"babel",
11+
"webpack",
12+
"component"
13+
],
14+
"scripts": {
15+
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
16+
},
17+
"main": "dist/vue-inject-js.min.js",
18+
"repository": "[email protected]:rnkit/vue-inject-js.git",
19+
"author": "SimMan <[email protected]>",
20+
"license": "MIT",
21+
"dependencies": {},
22+
"devDependencies": {
23+
"babel-core": "^6.0.0",
24+
"babel-eslint": "7.1.1",
25+
"babel-loader": "^6.0.0",
26+
"babel-plugin-transform-runtime": "^6.15.0",
27+
"babel-preset-env": "^1.6.0",
28+
"babel-preset-es2015": "^6.14.0",
29+
"babel-preset-stage-2": "^6.13.0",
30+
"babel-runtime": "^6.11.6",
31+
"cross-env": "^3.0.0",
32+
"css-loader": "^0.25.0",
33+
"eslint": "3.14.1",
34+
"eslint-config-airbnb-base": "11.0.1",
35+
"eslint-friendly-formatter": "2.0.7",
36+
"eslint-import-resolver-webpack": "0.8.1",
37+
"eslint-loader": "1.6.1",
38+
"eslint-plugin-html": "2.0.0",
39+
"eslint-plugin-import": "2.2.0",
40+
"file-loader": "^0.9.0",
41+
"vue-loader": "^11.1.4",
42+
"vue-template-compiler": "^2.2.1",
43+
"webpack": "^2.2.0",
44+
"webpack-dev-server": "^2.2.0"
45+
}
46+
}

0 commit comments

Comments
 (0)