@mobilabs/es6lib 2.0.3 → 2.1.1
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/.github/workflows/ci.yml +2 -1
- package/README.md +3 -3
- package/_dist/README.md +3 -3
- 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 +6 -6
- package/package.json +6 -5
- package/scripts/dep.npm.private.sh +42 -0
- /package/{tasks → scripts}/_build.template.js +0 -0
- /package/{tasks → scripts}/build.js.dev.js +0 -0
- /package/{tasks → scripts}/build.js.prod.js +0 -0
- /package/{tasks → scripts}/build.skeleton.prod.js +0 -0
- /package/{tasks → scripts}/compress.sh +0 -0
- /package/{tasks → scripts}/config.js +0 -0
- /package/{tasks → scripts}/dep.private.js +0 -0
package/.github/workflows/ci.yml
CHANGED
package/README.md
CHANGED
|
@@ -61,13 +61,13 @@ Your project Folder
|
|
|
61
61
|
| |_ ci.yml // Github Workflow file (if you use it),
|
|
62
62
|
|_ lib
|
|
63
63
|
| |_ lib.js // Your built ES6 UMD library,
|
|
64
|
-
| |_ lib.mjs // Your built ES6 Module,
|
|
64
|
+
| |_ lib.mjs // Your built ES6 Module,
|
|
65
|
+
|_ scripts
|
|
66
|
+
| |_ ... // The scripts to build your project,
|
|
65
67
|
|_ src
|
|
66
68
|
| |_ _footer // The UMD footer,
|
|
67
69
|
| |_ _header // The UMD header,
|
|
68
70
|
| |_ ... // The core or your library,
|
|
69
|
-
|_ tasks
|
|
70
|
-
| |_ ... // The tasks to build your project,
|
|
71
71
|
|_ test
|
|
72
72
|
| |_ main.js // Your Mocha, Chai test file,
|
|
73
73
|
|_ .eslintignore // Files to be ignored by ESLint,
|
package/_dist/README.md
CHANGED
|
@@ -61,13 +61,13 @@ Your project Folder
|
|
|
61
61
|
| |_ ci.yml // Github Workflow file (if you use it),
|
|
62
62
|
|_ lib
|
|
63
63
|
| |_ lib.js // Your built ES6 UMD library,
|
|
64
|
-
| |_ lib.mjs // Your built ES6 Module,
|
|
64
|
+
| |_ lib.mjs // Your built ES6 Module,
|
|
65
|
+
|_ scripts
|
|
66
|
+
| |_ ... // The scripts to build your project,
|
|
65
67
|
|_ src
|
|
66
68
|
| |_ _footer // The UMD footer,
|
|
67
69
|
| |_ _header // The UMD header,
|
|
68
70
|
| |_ ... // The core or your library,
|
|
69
|
-
|_ tasks
|
|
70
|
-
| |_ ... // The tasks to build your project,
|
|
71
71
|
|_ test
|
|
72
72
|
| |_ main.js // Your Mocha, Chai test file,
|
|
73
73
|
|_ .eslintignore // Files to be ignored by ESLint,
|
package/_dist/lib/es6lib.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! ****************************************************************************
|
|
2
|
-
* ES6lib v2.
|
|
2
|
+
* ES6lib v2.1.1
|
|
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.
|
|
316
|
+
version: '2.1.1',
|
|
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.
|
|
323
|
+
ES6lib.VERSION = '2.1.1';
|
|
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.
|
|
2
|
+
* ES6lib v2.1.1
|
|
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.
|
|
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.1"},t},e.NAME="ES6lib",e.VERSION="2.1.1",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.
|
|
2
|
+
* ES6lib v2.1.1
|
|
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.
|
|
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.1"},t},e.NAME="ES6lib",e.VERSION="2.1.1",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.
|
|
2
|
+
* ES6lib v2.1.1
|
|
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.
|
|
317
|
+
version: '2.1.1',
|
|
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.
|
|
324
|
+
ES6lib.VERSION = '2.1.1';
|
|
325
325
|
|
|
326
326
|
|
|
327
327
|
// -- Private Static Methods -----------------------------------------------
|
package/bin/es6lib.js
CHANGED
|
@@ -49,7 +49,7 @@ const defBoilerLib = 'ES6lib'
|
|
|
49
49
|
, { version } = require('../package.json')
|
|
50
50
|
, src = 'src'
|
|
51
51
|
, test = 'test'
|
|
52
|
-
,
|
|
52
|
+
, scripts = 'scripts'
|
|
53
53
|
, husky = '.husky'
|
|
54
54
|
, docs = 'docs'
|
|
55
55
|
// Command line Options
|
|
@@ -142,7 +142,6 @@ const index = [
|
|
|
142
142
|
const gitignore = [
|
|
143
143
|
'.DS_Store',
|
|
144
144
|
'',
|
|
145
|
-
'.nyc_output',
|
|
146
145
|
'coverage',
|
|
147
146
|
'node_modules',
|
|
148
147
|
''].join('\n');
|
|
@@ -314,6 +313,7 @@ function _customize(source, dest, app, owner, boilerlib) {
|
|
|
314
313
|
pack.scripts = obj.scripts;
|
|
315
314
|
pack.scripts['check:coverage'] = 'c8 check-coverage --statements 100 --branches 100 --functions 100 --lines 100';
|
|
316
315
|
delete pack.scripts['dep:private:package'];
|
|
316
|
+
delete pack.scripts['dep:npm:private:package'];
|
|
317
317
|
|
|
318
318
|
pack.repository = obj.repository;
|
|
319
319
|
pack.repository.url = `https://github.com/${owner.acronym}/${app.toLowerCase()}.git`;
|
|
@@ -376,7 +376,7 @@ function _addSrc(source, dest, folder, app, boilerlib) {
|
|
|
376
376
|
}
|
|
377
377
|
|
|
378
378
|
/**
|
|
379
|
-
* Adds the
|
|
379
|
+
* Adds the script files.
|
|
380
380
|
*
|
|
381
381
|
* @function (arg1, arg2, arg3, arg4, arg5)
|
|
382
382
|
* @private
|
|
@@ -387,7 +387,7 @@ function _addSrc(source, dest, folder, app, boilerlib) {
|
|
|
387
387
|
* @param {String} the name of the boilerplate,
|
|
388
388
|
* @returns {} -,
|
|
389
389
|
*/
|
|
390
|
-
function
|
|
390
|
+
function _addScripts(source, dest, folder, app, boilerlib) {
|
|
391
391
|
const exclude = []
|
|
392
392
|
, boiler = '{{boiler:name}}'
|
|
393
393
|
, ver = '{{boiler:name:version}}'
|
|
@@ -529,8 +529,8 @@ function _populate(options) {
|
|
|
529
529
|
// Copy the src files:
|
|
530
530
|
_addSrc(baseboiler, baseapp, src, app, boilerlib);
|
|
531
531
|
|
|
532
|
-
// Add
|
|
533
|
-
|
|
532
|
+
// Add scripts:
|
|
533
|
+
_addScripts(baseboiler, baseapp, scripts, app, boilerlib);
|
|
534
534
|
|
|
535
535
|
// Copy Test Files:
|
|
536
536
|
_addTest(baseboiler, baseapp, test, app, boilerlib);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mobilabs/es6lib",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "A template for writing pure ES6 Javascript libraries",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"minified": "_dist/lib/es6lib.min.js",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"general": " --- GENERAL ---",
|
|
14
14
|
|
|
15
15
|
"build:js": " --- JAVASCRIPT --- ",
|
|
16
|
-
"build:js:dev": "node
|
|
17
|
-
"build:js:prod": "node
|
|
16
|
+
"build:js:dev": "node scripts/build.js.dev.js $1",
|
|
17
|
+
"build:js:prod": "node scripts/build.js.prod.js $1",
|
|
18
18
|
|
|
19
19
|
"build:css": " --- CSS --- ",
|
|
20
20
|
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"build:dev": "npm run build:js:dev",
|
|
25
25
|
|
|
26
26
|
"build:production": " --- BUILD (PRODUCTION) --- ",
|
|
27
|
-
"build:skeleton:prod": "node
|
|
27
|
+
"build:skeleton:prod": "node scripts/build.skeleton.prod.js $1",
|
|
28
28
|
"prebuild:prod": "npm run build:dev && npm run build:skeleton:prod",
|
|
29
29
|
"build:prod": "npm run build:js:prod",
|
|
30
30
|
|
|
@@ -44,7 +44,8 @@
|
|
|
44
44
|
|
|
45
45
|
"deployment": " --- DEPLOYMENT --- ",
|
|
46
46
|
"dep:prod": "rm -rf _dist-$npm_package_version && npm run build:prod && cp -r _dist _dist-$npm_package_version",
|
|
47
|
-
"dep:private": "npm run build:prod && node
|
|
47
|
+
"dep:private:package": "npm run build:prod && node scripts/dep.private.js && sh scripts/compress.sh ${npm_package_name} ${npm_package_version} @mobilabs",
|
|
48
|
+
"dep:npm:private:package": "npm pack && sh scripts/dep.npm.private.sh ${npm_package_name} ${npm_package_version} @mobilabs",
|
|
48
49
|
|
|
49
50
|
"others": " --- OTHERS ---",
|
|
50
51
|
"prepare": "husky install",
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
NAME=$1
|
|
4
|
+
name=$(echo $1 | tr '[:upper:]' '[:lower:]')
|
|
5
|
+
VERSION=$2
|
|
6
|
+
NAMESPACE=$3
|
|
7
|
+
NPM='npm_private_repo'
|
|
8
|
+
|
|
9
|
+
# Check if it is a package with a namespace. For instance @mobilabs/libname
|
|
10
|
+
if [[ ! -z ${NAMESPACE} ]]
|
|
11
|
+
then
|
|
12
|
+
PREFIX=${NAMESPACE/@}
|
|
13
|
+
# remove the namespace:
|
|
14
|
+
NAMESPACE=${NAMESPACE}/
|
|
15
|
+
name=${name/${NAMESPACE}}
|
|
16
|
+
echo ${name}
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
if [[ -z ${name} ]]
|
|
20
|
+
then
|
|
21
|
+
echo 'You have to provide a name for the NPM package! Aborting ...'
|
|
22
|
+
exit 1
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
if [[ -z ${VERSION} ]]
|
|
26
|
+
then
|
|
27
|
+
echo 'You have to provide a version for the NPM package! Aborting ...'
|
|
28
|
+
exit 1
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
mkdir -p ${NPM}/${name}
|
|
32
|
+
if [[ ! -z ${NAMESPACE} ]]
|
|
33
|
+
then
|
|
34
|
+
mv ${PREFIX}-${name}-${VERSION}.tgz ./${NPM}/${name}/.
|
|
35
|
+
else
|
|
36
|
+
mv ${name}-${VERSION}.tgz ./${NPM}/${name}/.
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
echo 'done!'
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
# -- oOo --
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|