@mobilabs/es6lib 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.husky/pre-commit +3 -0
- package/README.md +1 -1
- package/_dist/README.md +1 -1
- package/_dist/lib/es6lib.js +3 -3
- package/_dist/lib/es6lib.min.js +2 -2
- package/_dist/lib/es6lib.min.mjs +2 -2
- package/_dist/lib/es6lib.mjs +3 -3
- package/bin/es6lib.js +77 -23
- package/package.json +1 -1
- package/test/index.html +1 -1
package/.husky/pre-commit
CHANGED
package/README.md
CHANGED
|
@@ -183,5 +183,5 @@ Enjoy!
|
|
|
183
183
|
[commit-url]: https://github.com/jclo/es6lib/commits/master
|
|
184
184
|
[ci-url]: https://github.com/jclo/es6lib/actions/workflows/ci.yml
|
|
185
185
|
[coveralls-url]: https://coveralls.io/github/jclo/es6lib?branch=master
|
|
186
|
-
[license-url]: http://opensource.org/licenses/MIT
|
|
187
186
|
[npm-bundle-size-url]: https://img.shields.io/bundlephobia/minzip/@mobilabs/es6lib
|
|
187
|
+
[license-url]: http://opensource.org/licenses/MIT
|
package/_dist/README.md
CHANGED
|
@@ -183,5 +183,5 @@ Enjoy!
|
|
|
183
183
|
[commit-url]: https://github.com/jclo/es6lib/commits/master
|
|
184
184
|
[ci-url]: https://github.com/jclo/es6lib/actions/workflows/ci.yml
|
|
185
185
|
[coveralls-url]: https://coveralls.io/github/jclo/es6lib?branch=master
|
|
186
|
-
[license-url]: http://opensource.org/licenses/MIT
|
|
187
186
|
[npm-bundle-size-url]: https://img.shields.io/bundlephobia/minzip/@mobilabs/es6lib
|
|
187
|
+
[license-url]: http://opensource.org/licenses/MIT
|
package/_dist/lib/es6lib.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! ****************************************************************************
|
|
2
|
-
* ES6lib v2.1.
|
|
2
|
+
* ES6lib v2.1.2
|
|
3
3
|
*
|
|
4
4
|
* A template for writing pure ES6 Javascript libraries.
|
|
5
5
|
* (you can download it from npm or github repositories)
|
|
@@ -313,14 +313,14 @@
|
|
|
313
313
|
const obj = Object.create(methods);
|
|
314
314
|
obj._library = {
|
|
315
315
|
name: 'ES6lib',
|
|
316
|
-
version: '2.1.
|
|
316
|
+
version: '2.1.2',
|
|
317
317
|
};
|
|
318
318
|
return obj;
|
|
319
319
|
};
|
|
320
320
|
|
|
321
321
|
// Attaches constants to ES6lib that provide name and version of the lib.
|
|
322
322
|
ES6lib.NAME = 'ES6lib';
|
|
323
|
-
ES6lib.VERSION = '2.1.
|
|
323
|
+
ES6lib.VERSION = '2.1.2';
|
|
324
324
|
|
|
325
325
|
|
|
326
326
|
// -- Private Static Methods -----------------------------------------------
|
package/_dist/lib/es6lib.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! ****************************************************************************
|
|
2
|
-
* ES6lib v2.1.
|
|
2
|
+
* ES6lib v2.1.2
|
|
3
3
|
*
|
|
4
4
|
* A template for writing pure ES6 Javascript libraries.
|
|
5
5
|
* (you can download it from npm or github repositories)
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* at: http://www.opensource.org/licenses/mit-license.php).
|
|
9
9
|
* Built from {{boiler:name}} v{{boiler:name:version}}.
|
|
10
10
|
* ************************************************************************** */
|
|
11
|
-
!function(t,e){"use strict";"function"==typeof define&&define.amd?define([""],e):"object"==typeof exports?module.exports=e(t):t.ES6lib=e(t)}(this,(t=>{"use strict";let e,n;const i={Public:{}};return n=function(t,e){const n=Object.keys(e);for(let i=0;i<n.length;i++)t[n[i]]=e[n[i]]},function(){const t=i.Public;n(t,{getString:()=>"I am a string!",getArray:()=>[1,2,3]})}(),function(){const n=i.Public,r=t.ES6lib;let o;e=function(){const t=Object.create(o);return t._library={name:"ES6lib",version:"2.1.
|
|
11
|
+
!function(t,e){"use strict";"function"==typeof define&&define.amd?define([""],e):"object"==typeof exports?module.exports=e(t):t.ES6lib=e(t)}(this,(t=>{"use strict";let e,n;const i={Public:{}};return n=function(t,e){const n=Object.keys(e);for(let i=0;i<n.length;i++)t[n[i]]=e[n[i]]},function(){const t=i.Public;n(t,{getString:()=>"I am a string!",getArray:()=>[1,2,3]})}(),function(){const n=i.Public,r=t.ES6lib;let o;e=function(){const t=Object.create(o);return t._library={name:"ES6lib",version:"2.1.2"},t},e.NAME="ES6lib",e.VERSION="2.1.2",e._setTestMode=function(){return[]},e.noConflict=function(){return t.ES6lib=r,this},o={whoami(){return this._library},getString:()=>n.getString(),getArray:()=>n.getArray()}}(),e}));
|
package/_dist/lib/es6lib.min.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! ****************************************************************************
|
|
2
|
-
* ES6lib v2.1.
|
|
2
|
+
* ES6lib v2.1.2
|
|
3
3
|
*
|
|
4
4
|
* A template for writing pure ES6 Javascript libraries.
|
|
5
5
|
* (you can download it from npm or github repositories)
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* at: http://www.opensource.org/licenses/mit-license.php).
|
|
9
9
|
* Built from {{boiler:name}} v{{boiler:name:version}}.
|
|
10
10
|
* ************************************************************************** */
|
|
11
|
-
const $__ES6GLOB={};!function(t,e){"use strict";"function"==typeof define&&define.amd?define([""],e):"object"==typeof exports?module.exports=e(t):t.ES6lib=e(t)}($__ES6GLOB,(t=>{"use strict";let e,n;const i={Public:{}};return n=function(t,e){const n=Object.keys(e);for(let i=0;i<n.length;i++)t[n[i]]=e[n[i]]},function(){const t=i.Public;n(t,{getString:()=>"I am a string!",getArray:()=>[1,2,3]})}(),function(){const n=i.Public,r=t.ES6lib;let o;e=function(){const t=Object.create(o);return t._library={name:"ES6lib",version:"2.1.
|
|
11
|
+
const $__ES6GLOB={};!function(t,e){"use strict";"function"==typeof define&&define.amd?define([""],e):"object"==typeof exports?module.exports=e(t):t.ES6lib=e(t)}($__ES6GLOB,(t=>{"use strict";let e,n;const i={Public:{}};return n=function(t,e){const n=Object.keys(e);for(let i=0;i<n.length;i++)t[n[i]]=e[n[i]]},function(){const t=i.Public;n(t,{getString:()=>"I am a string!",getArray:()=>[1,2,3]})}(),function(){const n=i.Public,r=t.ES6lib;let o;e=function(){const t=Object.create(o);return t._library={name:"ES6lib",version:"2.1.2"},t},e.NAME="ES6lib",e.VERSION="2.1.2",e._setTestMode=function(){return[]},e.noConflict=function(){return t.ES6lib=r,this},o={whoami(){return this._library},getString:()=>n.getString(),getArray:()=>n.getArray()}}(),e}));export default $__ES6GLOB.ES6lib;
|
package/_dist/lib/es6lib.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! ****************************************************************************
|
|
2
|
-
* ES6lib v2.1.
|
|
2
|
+
* ES6lib v2.1.2
|
|
3
3
|
*
|
|
4
4
|
* A template for writing pure ES6 Javascript libraries.
|
|
5
5
|
* (you can download it from npm or github repositories)
|
|
@@ -314,14 +314,14 @@ const $__ES6GLOB = {};
|
|
|
314
314
|
const obj = Object.create(methods);
|
|
315
315
|
obj._library = {
|
|
316
316
|
name: 'ES6lib',
|
|
317
|
-
version: '2.1.
|
|
317
|
+
version: '2.1.2',
|
|
318
318
|
};
|
|
319
319
|
return obj;
|
|
320
320
|
};
|
|
321
321
|
|
|
322
322
|
// Attaches constants to ES6lib that provide name and version of the lib.
|
|
323
323
|
ES6lib.NAME = 'ES6lib';
|
|
324
|
-
ES6lib.VERSION = '2.1.
|
|
324
|
+
ES6lib.VERSION = '2.1.2';
|
|
325
325
|
|
|
326
326
|
|
|
327
327
|
// -- Private Static Methods -----------------------------------------------
|
package/bin/es6lib.js
CHANGED
|
@@ -36,10 +36,10 @@ const fs = require('fs')
|
|
|
36
36
|
;
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
// -- Local
|
|
39
|
+
// -- Local Modules
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
// -- Local
|
|
42
|
+
// -- Local Constants
|
|
43
43
|
const defBoilerLib = 'ES6lib'
|
|
44
44
|
/* eslint-disable-next-line object-curly-newline */
|
|
45
45
|
, defAuthor = { name: 'John Doe', acronym: 'jdo', email: 'jdo@johndoe.com', url: 'http://www.johndoe.com' }
|
|
@@ -68,17 +68,20 @@ const defBoilerLib = 'ES6lib'
|
|
|
68
68
|
h: ['--help'],
|
|
69
69
|
v: ['--version', version],
|
|
70
70
|
p: ['--path'],
|
|
71
|
-
b: ['--boilerlib'],
|
|
72
|
-
n: ['--name'],
|
|
73
|
-
a: ['--author'],
|
|
74
|
-
c: ['--acronym'],
|
|
75
|
-
e: ['--email'],
|
|
76
|
-
u: ['--url'],
|
|
71
|
+
b: ['--boilerlib', defBoilerLib],
|
|
72
|
+
n: ['--name', defAuthor.name],
|
|
73
|
+
a: ['--author', defAuthor.name],
|
|
74
|
+
c: ['--acronym', defAuthor.acronym],
|
|
75
|
+
e: ['--email', defAuthor.email],
|
|
76
|
+
u: ['--url', defAuthor.url],
|
|
77
77
|
}
|
|
78
78
|
, parsed = nopt(opts, shortOpts, process.argv, 2)
|
|
79
79
|
;
|
|
80
80
|
|
|
81
81
|
|
|
82
|
+
// -- Local Variables
|
|
83
|
+
|
|
84
|
+
|
|
82
85
|
// -- Templates
|
|
83
86
|
const readme = [
|
|
84
87
|
'# {{lib:name}}',
|
|
@@ -137,23 +140,27 @@ const index = [
|
|
|
137
140
|
"'use strict';",
|
|
138
141
|
'',
|
|
139
142
|
"module.exports = require('./lib/{{lib:lowname}}');",
|
|
140
|
-
''
|
|
143
|
+
'',
|
|
144
|
+
].join('\n');
|
|
141
145
|
|
|
142
146
|
const gitignore = [
|
|
143
147
|
'.DS_Store',
|
|
144
148
|
'',
|
|
145
149
|
'coverage',
|
|
146
150
|
'node_modules',
|
|
147
|
-
''
|
|
151
|
+
'',
|
|
152
|
+
].join('\n');
|
|
148
153
|
|
|
149
154
|
const eslintignore = [
|
|
150
155
|
'_dist/lib/{{lib:lowname}}.min.*',
|
|
151
|
-
''
|
|
156
|
+
'',
|
|
157
|
+
].join('\n');
|
|
152
158
|
|
|
153
159
|
const npmignore = [
|
|
154
160
|
'*',
|
|
155
161
|
'!_dist/**/*',
|
|
156
|
-
''
|
|
162
|
+
'',
|
|
163
|
+
].join('\n');
|
|
157
164
|
|
|
158
165
|
|
|
159
166
|
// -- Private Functions --------------------------------------------------------
|
|
@@ -544,19 +551,66 @@ function _populate(options) {
|
|
|
544
551
|
process.stdout.write('Done. Enjoy!\n');
|
|
545
552
|
}
|
|
546
553
|
|
|
554
|
+
/**
|
|
555
|
+
* Runs the script.
|
|
556
|
+
*
|
|
557
|
+
* @function ()
|
|
558
|
+
* @private
|
|
559
|
+
* @param {} -,
|
|
560
|
+
* @returns {} -,
|
|
561
|
+
* @since 0.0.0
|
|
562
|
+
*/
|
|
563
|
+
function _run() {
|
|
564
|
+
if (parsed.help) {
|
|
565
|
+
_help();
|
|
566
|
+
}
|
|
547
567
|
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
}
|
|
568
|
+
if (parsed.version) {
|
|
569
|
+
process.stdout.write(`version: ${parsed.version}\n`);
|
|
570
|
+
return;
|
|
571
|
+
}
|
|
552
572
|
|
|
553
|
-
if (parsed.
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
}
|
|
573
|
+
if (parsed.boilerlib) {
|
|
574
|
+
process.stdout.write(`boilerlib: ${parsed.boilerlib}\n`);
|
|
575
|
+
return;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
if (parsed.name) {
|
|
579
|
+
process.stdout.write(`name: ${parsed.name}\n`);
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
if (parsed.author) {
|
|
584
|
+
process.stdout.write(`author: ${parsed.author}\n`);
|
|
585
|
+
return;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
if (parsed.acronym) {
|
|
589
|
+
process.stdout.write(`acronym: ${parsed.acronym}\n`);
|
|
590
|
+
return;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
if (parsed.email) {
|
|
594
|
+
process.stdout.write(`email: ${parsed.email}\n`);
|
|
595
|
+
return;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
if (parsed.url) {
|
|
599
|
+
process.stdout.write(`url: ${parsed.url}\n`);
|
|
600
|
+
return;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
if (parsed.argv.remain[0] === 'populate') {
|
|
604
|
+
_populate(parsed);
|
|
605
|
+
return;
|
|
606
|
+
}
|
|
557
607
|
|
|
558
|
-
if (parsed.argv.remain[0] === 'populate') {
|
|
559
|
-
_populate(parsed);
|
|
560
|
-
} else {
|
|
561
608
|
_help();
|
|
562
609
|
}
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
// -- Where the script starts --------------------------------------------------
|
|
613
|
+
_run();
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
// -- oOo ---
|
package/package.json
CHANGED
package/test/index.html
CHANGED