Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

Commit 9b32356

Browse files
author
Steffan
committed
v1.0.6
1 parent 1daf8de commit 9b32356

File tree

6 files changed

+98
-59
lines changed

6 files changed

+98
-59
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ $ npm install vue-fields
1616
```
1717

1818
### CDN
19-
Available on [jsdelivr](https://cdn.jsdelivr.net/npm/[email protected].5) or [unpkg](https://unpkg.com/[email protected].5).
19+
Available on [jsdelivr](https://cdn.jsdelivr.net/npm/[email protected].6) or [unpkg](https://unpkg.com/[email protected].6).
2020
```html
21-
<script src="https://cdn.jsdelivr.net/npm/[email protected].5"></script>
21+
<script src="https://cdn.jsdelivr.net/npm/[email protected].6"></script>
2222
```
2323

2424
## Changelog

dist/vue-fields.common.js

+31-18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-fields v1.0.5
2+
* vue-fields v1.0.6
33
* https://github.com/pagekit/vue-fields
44
* Released under the MIT License.
55
*/
@@ -10,7 +10,7 @@
1010
* Utility functions.
1111
*/
1212

13-
var debug = false, _set;
13+
var _config = {}, _set;
1414

1515
var assign = Object.assign || _assign;
1616

@@ -21,15 +21,23 @@ function Util (ref) {
2121
var config = ref.config;
2222

2323
_set = set;
24-
debug = config.debug || !config.silent;
24+
_config = config;
2525
}
2626

27-
function warn(msg) {
28-
if (typeof console !== 'undefined' && debug) {
29-
console.log(("%c vue-fields %c " + msg + " "), 'color: #fff; background: #35495E; padding: 1px; border-radius: 3px 0 0 3px;', 'color: #fff; background: #DB6B00; padding: 1px; border-radius: 0 3px 3px 0;');
27+
function log(message, color) {
28+
if ( color === void 0 ) color = '#41B883';
29+
30+
if (typeof console !== 'undefined' && _config.devtools) {
31+
console.log(("%c vue-fields %c " + message + " "), 'color: #fff; background: #35495E; padding: 1px; border-radius: 3px 0 0 3px;', ("color: #fff; background: " + color + "; padding: 1px; border-radius: 0 3px 3px 0;"));
3032
}
3133
}
3234

35+
function warn(message, color) {
36+
if ( color === void 0 ) color = '#DB6B00';
37+
38+
log(message, color);
39+
}
40+
3341
function isString(val) {
3442
return typeof val === 'string';
3543
}
@@ -384,23 +392,28 @@ function $match(subject, pattern, flags) {
384392
* Install plugin.
385393
*/
386394

387-
function plugin(Vue) {
395+
var Plugin = {
388396

389-
if (plugin.installed) {
390-
return;
391-
}
397+
Field: Field,
398+
Fields: Fields,
392399

393-
Util(Vue);
400+
install: function install(Vue) {
394401

395-
Vue.component('field', Field);
396-
Vue.component('fields', Fields);
397-
}
402+
if (this.installed) {
403+
return;
404+
}
405+
406+
Util(Vue); log(this.version);
398407

399-
plugin.Field = Field;
400-
plugin.Fields = Fields;
408+
Vue.component('field', Field);
409+
Vue.component('fields', Fields);
410+
},
411+
412+
version: '1.0.6'
413+
};
401414

402415
if (typeof window !== 'undefined' && window.Vue) {
403-
window.Vue.use(plugin);
416+
window.Vue.use(Plugin);
404417
}
405418

406-
module.exports = plugin;
419+
module.exports = Plugin;

dist/vue-fields.esm.js

+31-18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-fields v1.0.5
2+
* vue-fields v1.0.6
33
* https://github.com/pagekit/vue-fields
44
* Released under the MIT License.
55
*/
@@ -8,7 +8,7 @@
88
* Utility functions.
99
*/
1010

11-
var debug = false, _set;
11+
var _config = {}, _set;
1212

1313
var assign = Object.assign || _assign;
1414

@@ -19,15 +19,23 @@ function Util (ref) {
1919
var config = ref.config;
2020

2121
_set = set;
22-
debug = config.debug || !config.silent;
22+
_config = config;
2323
}
2424

25-
function warn(msg) {
26-
if (typeof console !== 'undefined' && debug) {
27-
console.log(("%c vue-fields %c " + msg + " "), 'color: #fff; background: #35495E; padding: 1px; border-radius: 3px 0 0 3px;', 'color: #fff; background: #DB6B00; padding: 1px; border-radius: 0 3px 3px 0;');
25+
function log(message, color) {
26+
if ( color === void 0 ) color = '#41B883';
27+
28+
if (typeof console !== 'undefined' && _config.devtools) {
29+
console.log(("%c vue-fields %c " + message + " "), 'color: #fff; background: #35495E; padding: 1px; border-radius: 3px 0 0 3px;', ("color: #fff; background: " + color + "; padding: 1px; border-radius: 0 3px 3px 0;"));
2830
}
2931
}
3032

33+
function warn(message, color) {
34+
if ( color === void 0 ) color = '#DB6B00';
35+
36+
log(message, color);
37+
}
38+
3139
function isString(val) {
3240
return typeof val === 'string';
3341
}
@@ -382,24 +390,29 @@ function $match(subject, pattern, flags) {
382390
* Install plugin.
383391
*/
384392

385-
function plugin(Vue) {
393+
var Plugin = {
386394

387-
if (plugin.installed) {
388-
return;
389-
}
395+
Field: Field,
396+
Fields: Fields,
390397

391-
Util(Vue);
398+
install: function install(Vue) {
392399

393-
Vue.component('field', Field);
394-
Vue.component('fields', Fields);
395-
}
400+
if (this.installed) {
401+
return;
402+
}
403+
404+
Util(Vue); log(this.version);
396405

397-
plugin.Field = Field;
398-
plugin.Fields = Fields;
406+
Vue.component('field', Field);
407+
Vue.component('fields', Fields);
408+
},
409+
410+
version: '1.0.6'
411+
};
399412

400413
if (typeof window !== 'undefined' && window.Vue) {
401-
window.Vue.use(plugin);
414+
window.Vue.use(Plugin);
402415
}
403416

404-
export default plugin;
417+
export default Plugin;
405418
export {Field, Fields};

dist/vue-fields.js

+31-18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-fields v1.0.5
2+
* vue-fields v1.0.6
33
* https://github.com/pagekit/vue-fields
44
* Released under the MIT License.
55
*/
@@ -14,7 +14,7 @@
1414
* Utility functions.
1515
*/
1616

17-
var debug = false, _set;
17+
var _config = {}, _set;
1818

1919
var assign = Object.assign || _assign;
2020

@@ -25,15 +25,23 @@
2525
var config = ref.config;
2626

2727
_set = set;
28-
debug = config.debug || !config.silent;
28+
_config = config;
2929
}
3030

31-
function warn(msg) {
32-
if (typeof console !== 'undefined' && debug) {
33-
console.log(("%c vue-fields %c " + msg + " "), 'color: #fff; background: #35495E; padding: 1px; border-radius: 3px 0 0 3px;', 'color: #fff; background: #DB6B00; padding: 1px; border-radius: 0 3px 3px 0;');
31+
function log(message, color) {
32+
if ( color === void 0 ) color = '#41B883';
33+
34+
if (typeof console !== 'undefined' && _config.devtools) {
35+
console.log(("%c vue-fields %c " + message + " "), 'color: #fff; background: #35495E; padding: 1px; border-radius: 3px 0 0 3px;', ("color: #fff; background: " + color + "; padding: 1px; border-radius: 0 3px 3px 0;"));
3436
}
3537
}
3638

39+
function warn(message, color) {
40+
if ( color === void 0 ) color = '#DB6B00';
41+
42+
log(message, color);
43+
}
44+
3745
function isString(val) {
3846
return typeof val === 'string';
3947
}
@@ -388,25 +396,30 @@
388396
* Install plugin.
389397
*/
390398

391-
function plugin(Vue) {
399+
var Plugin = {
392400

393-
if (plugin.installed) {
394-
return;
395-
}
401+
Field: Field,
402+
Fields: Fields,
396403

397-
Util(Vue);
404+
install: function install(Vue) {
398405

399-
Vue.component('field', Field);
400-
Vue.component('fields', Fields);
401-
}
406+
if (this.installed) {
407+
return;
408+
}
409+
410+
Util(Vue); log(this.version);
402411

403-
plugin.Field = Field;
404-
plugin.Fields = Fields;
412+
Vue.component('field', Field);
413+
Vue.component('fields', Fields);
414+
},
415+
416+
version: '1.0.6'
417+
};
405418

406419
if (typeof window !== 'undefined' && window.Vue) {
407-
window.Vue.use(plugin);
420+
window.Vue.use(Plugin);
408421
}
409422

410-
return plugin;
423+
return Plugin;
411424

412425
})));

dist/vue-fields.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)