Skip to content

Commit e2be12d

Browse files
author
Ewing(Yu-An Lin)
committed
v1.0.0
0 parents  commit e2be12d

File tree

8 files changed

+206
-0
lines changed

8 files changed

+206
-0
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["es2015"]
3+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

LICENSE

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
AFL-2.0
2+
3+
Copyright 2017 Yu-An Lin
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.

dist/vue-lodash.js

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
/******/ (function(modules) { // webpackBootstrap
2+
/******/ // The module cache
3+
/******/ var installedModules = {};
4+
/******/
5+
/******/ // The require function
6+
/******/ function __webpack_require__(moduleId) {
7+
/******/
8+
/******/ // Check if module is in cache
9+
/******/ if(installedModules[moduleId]) {
10+
/******/ return installedModules[moduleId].exports;
11+
/******/ }
12+
/******/ // Create a new module (and put it into the cache)
13+
/******/ var module = installedModules[moduleId] = {
14+
/******/ i: moduleId,
15+
/******/ l: false,
16+
/******/ exports: {}
17+
/******/ };
18+
/******/
19+
/******/ // Execute the module function
20+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21+
/******/
22+
/******/ // Flag the module as loaded
23+
/******/ module.l = true;
24+
/******/
25+
/******/ // Return the exports of the module
26+
/******/ return module.exports;
27+
/******/ }
28+
/******/
29+
/******/
30+
/******/ // expose the modules object (__webpack_modules__)
31+
/******/ __webpack_require__.m = modules;
32+
/******/
33+
/******/ // expose the module cache
34+
/******/ __webpack_require__.c = installedModules;
35+
/******/
36+
/******/ // identity function for calling harmony imports with the correct context
37+
/******/ __webpack_require__.i = function(value) { return value; };
38+
/******/
39+
/******/ // define getter function for harmony exports
40+
/******/ __webpack_require__.d = function(exports, name, getter) {
41+
/******/ if(!__webpack_require__.o(exports, name)) {
42+
/******/ Object.defineProperty(exports, name, {
43+
/******/ configurable: false,
44+
/******/ enumerable: true,
45+
/******/ get: getter
46+
/******/ });
47+
/******/ }
48+
/******/ };
49+
/******/
50+
/******/ // getDefaultExport function for compatibility with non-harmony modules
51+
/******/ __webpack_require__.n = function(module) {
52+
/******/ var getter = module && module.__esModule ?
53+
/******/ function getDefault() { return module['default']; } :
54+
/******/ function getModuleExports() { return module; };
55+
/******/ __webpack_require__.d(getter, 'a', getter);
56+
/******/ return getter;
57+
/******/ };
58+
/******/
59+
/******/ // Object.prototype.hasOwnProperty.call
60+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
61+
/******/
62+
/******/ // __webpack_public_path__
63+
/******/ __webpack_require__.p = "/dist/";
64+
/******/
65+
/******/ // Load entry module and return exports
66+
/******/ return __webpack_require__(__webpack_require__.s = 0);
67+
/******/ })
68+
/************************************************************************/
69+
/******/ ([
70+
/* 0 */
71+
/***/ (function(module, exports, __webpack_require__) {
72+
73+
"use strict";
74+
75+
76+
Object.defineProperty(exports, "__esModule", {
77+
value: true
78+
});
79+
/* eslint-disable */
80+
var VueLodash = {
81+
install: function install(Vue, _) {
82+
Vue._ = _;
83+
Object.defineProperties(Vue.prototype, {
84+
_: {
85+
get: function get() {
86+
return _;
87+
}
88+
}
89+
});
90+
Vue.mixin({
91+
mounted: function mounted() {
92+
// Just tell you that it is mounted
93+
// console.log('VueLodash');
94+
}
95+
});
96+
if (typeof window !== 'undefined' && window.Vue) {
97+
window.Vue.use(VueLodash);
98+
}
99+
}
100+
};
101+
102+
exports.default = VueLodash;
103+
104+
/***/ })
105+
/******/ ]);

dist/vue-lodash.min.js

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: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "vue-lodash",
3+
"version": "1.0.0",
4+
"description": "A small wrapper for integrating lodash into VueJs",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"There is currently no test case for this plugin\" && exit 1"
8+
},
9+
"keywords": [
10+
"vue",
11+
"lodash",
12+
"wrapper"
13+
],
14+
"author": "Yu-An Lin (Ewocker)",
15+
"license": "AFL-2.0",
16+
"peerDependencies": {
17+
"vue": ">= 2.0.0"
18+
},
19+
"devDependencies": {
20+
"babel": "^6.23.0",
21+
"babel-core": "^6.24.1",
22+
"babel-loader": "^7.0.0",
23+
"babel-preset-es2015": "^6.24.1",
24+
"uglifyjs-webpack-plugin": "^0.4.3",
25+
"webpack": "^2.4.1"
26+
}
27+
}

src/index.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/* eslint-disable */
2+
const VueLodash = {
3+
install (Vue, _) {
4+
Vue._ = _
5+
Object.defineProperties(Vue.prototype, {
6+
_: {
7+
get() {
8+
return _
9+
}
10+
}
11+
})
12+
Vue.mixin({
13+
mounted() {
14+
// Just tell you that it is mounted
15+
// console.log('VueLodash');
16+
}
17+
})
18+
if (typeof window !== 'undefined' && window.Vue) {
19+
window.Vue.use(VueLodash)
20+
}
21+
}
22+
}
23+
24+
export default VueLodash

webpack.config.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
const path = require('path')
2+
const webpack = require('webpack')
3+
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
4+
5+
module.exports = {
6+
entry: {
7+
'vue-lodash': './src/index.js',
8+
'vue-lodash.min': './src/index.js'
9+
},
10+
output: {
11+
path: path.resolve(__dirname, './dist'),
12+
publicPath: '/dist/',
13+
filename: '[name].js'
14+
},
15+
module: {
16+
rules: [
17+
{
18+
test: /\.js$/,
19+
loader: 'babel-loader',
20+
exclude: /node_modules/
21+
}
22+
]
23+
},
24+
plugins: [
25+
new UglifyJSPlugin({
26+
include: /\.min\.js$/,
27+
minimize: true
28+
})
29+
]
30+
}

0 commit comments

Comments
 (0)