@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.
@@ -3,7 +3,7 @@ name: CI pipeline
3
3
 
4
4
  on:
5
5
  push:
6
- branches: [ master ]
6
+ branches: [ master, main ]
7
7
 
8
8
  jobs:
9
9
  build:
@@ -20,3 +20,4 @@ jobs:
20
20
 
21
21
  - name: Coveralls
22
22
  uses: coverallsapp/github-action@v2
23
+ # -- oOo --
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,
@@ -1,5 +1,5 @@
1
1
  /*! ****************************************************************************
2
- * ES6lib v2.0.3
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.0.3',
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.0.3';
323
+ ES6lib.VERSION = '2.1.1';
324
324
 
325
325
 
326
326
  // -- Private Static Methods -----------------------------------------------
@@ -1,5 +1,5 @@
1
1
  /*! ****************************************************************************
2
- * ES6lib v2.0.3
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.0.3"},t},e.NAME="ES6lib",e.VERSION="2.0.3",e._setTestMode=function(){return[]},e.noConflict=function(){return t.ES6lib=r,this},o={whoami(){return this._library},getString:()=>n.getString(),getArray:()=>n.getArray()}}(),e}));
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}));
@@ -1,5 +1,5 @@
1
1
  /*! ****************************************************************************
2
- * ES6lib v2.0.3
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.0.3"},t},e.NAME="ES6lib",e.VERSION="2.0.3",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;
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;
@@ -1,5 +1,5 @@
1
1
  /*! ****************************************************************************
2
- * ES6lib v2.0.3
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.0.3',
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.0.3';
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
- , tasks = 'tasks'
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 task files.
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 _addTasks(source, dest, folder, app, boilerlib) {
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 tasks:
533
- _addTasks(baseboiler, baseapp, tasks, app, boilerlib);
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.0.3",
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 tasks/build.js.dev.js $1",
17
- "build:js:prod": "node tasks/build.js.prod.js $1",
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 tasks/build.skeleton.prod.js $1",
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 tasks/dep.private.js && sh tasks/compress.sh ${npm_package_name} ${npm_package_version} @mobilabs",
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