Skip to content

Commit

Permalink
Updated the project with @mobilabs/es6lib v2.2.1 (improved scripts).
Browse files Browse the repository at this point in the history
  • Loading branch information
jclo committed Feb 9, 2024
1 parent e4a99a6 commit 81efa99
Show file tree
Hide file tree
Showing 24 changed files with 704 additions and 515 deletions.
2 changes: 0 additions & 2 deletions .gitignore
@@ -1,7 +1,5 @@
.DS_Store
__trash
_old_*
__old_*
z_*

_dist-*
Expand Down
3 changes: 3 additions & 0 deletions .husky/pre-commit
Expand Up @@ -6,3 +6,6 @@ npm run build:prod
npm test
npm run check:coverage
npm run report


# -- oOo ---
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,11 @@
### HEAD

### 2.1.1 (February 9, 2024)

* Updated the project with @mobilabs/es6lib v2.2.1 (improved scripts),
* ...,


### 2.1.0 (January 20, 2024)

* Updated the project with @mobilabs/es6lib v2.1.1,
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2024 Mobilabs <contact@mobilabs.fr> (http://www.mobilabs.fr)
Copyright (c) 2024 Mobilabs <contact@mobilabs.fr> (https://www.mobilabs.fr)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion _dist/LICENSE.md
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2024 Mobilabs <contact@mobilabs.fr> (http://www.mobilabs.fr)
Copyright (c) 2024 Mobilabs <contact@mobilabs.fr> (https://www.mobilabs.fr)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
7 changes: 4 additions & 3 deletions _dist/lib/es6kadoo.js
Expand Up @@ -3,20 +3,20 @@
*
* A template for writing pure ES6 Javascript libraries.
* (you can download it from npm or github repositories)
* Copyright (c) 2024 Mobilabs <contact@mobilabs.fr> (http://www.mobilabs.fr).
* Copyright (c) 2024 Mobilabs <contact@mobilabs.fr> (https://www.mobilabs.fr).
* Released under the MIT license. You may obtain a copy of the License
* at: http://www.opensource.org/licenses/mit-license.php).
* Built from {{boiler:name}} v{{boiler:name:version}}.
* ************************************************************************** */
/*! Generated by Kadoo v1.2.0 */
/*! Generated by Kadoo v1.2.1 */
// ESLint declarations
/* global define */
/* eslint no-shadow: ['error', { 'allow': ['root'] }] */
/* eslint strict: ["error", "function"] */
(function(root, factory) {
'use strict';

/* istanbul ignore next */
/* c8 ignore start */
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([''], factory);
Expand All @@ -31,6 +31,7 @@
/* eslint-disable-next-line no-param-reassign */
root.ES6Kadoo = factory(root);
}
/* c8 ignore stop */
}(this, (root) => {
'use strict';

Expand Down
4 changes: 2 additions & 2 deletions _dist/lib/es6kadoo.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions _dist/lib/es6kadoo.min.mjs
Expand Up @@ -3,10 +3,10 @@
*
* A template for writing pure ES6 Javascript libraries.
* (you can download it from npm or github repositories)
* Copyright (c) 2024 Mobilabs <contact@mobilabs.fr> (http://www.mobilabs.fr).
* Copyright (c) 2024 Mobilabs <contact@mobilabs.fr> (https://www.mobilabs.fr).
* Released under the MIT license. You may obtain a copy of the License
* at: http://www.opensource.org/licenses/mit-license.php).
* Built from {{boiler:name}} v{{boiler:name:version}}.
* ************************************************************************** */
/*! Generated by Kadoo v1.2.0 */
/*! Generated by Kadoo v1.2.1 */
const $__ES6GLOB={};!function(t,e){"use strict";"function"==typeof define&&define.amd?define([""],e):"object"==typeof exports?module.exports=e(t):t.ES6Kadoo=e(t)}($__ES6GLOB,(t=>{"use strict";let e={src:{prototypal:{},util:{util:{}}},extend:function(t,e){for(var o=Object.keys(e),r=0;r<o.length;r++)t[o[r]]=e[o[r]]}};return function(){const o=e.src.util.util,r=t.ES6Kadoo;let n;const i=function(){const t=Object.create(n);return t._library={name:"ES6Kadoo",version:"2.1.0"},t};i.NAME="ES6Kadoo",i.VERSION="2.1.0",i._setTestMode=function(){return[]},i.noConflict=function(){return t.ES6Kadoo=r,this},n={whoami(){return this._library},getString:()=>o.getString(),getArray:()=>o.getArray()},e.src.prototypal=i}(),function(){const t={getString:()=>"I am a string!",getArray:()=>[1,2,3]};e.extend(e.src.util.util,t)}(),e.src.prototypal}));export default $__ES6GLOB.ES6Kadoo;
7 changes: 4 additions & 3 deletions _dist/lib/es6kadoo.mjs
Expand Up @@ -3,12 +3,12 @@
*
* A template for writing pure ES6 Javascript libraries.
* (you can download it from npm or github repositories)
* Copyright (c) 2024 Mobilabs <contact@mobilabs.fr> (http://www.mobilabs.fr).
* Copyright (c) 2024 Mobilabs <contact@mobilabs.fr> (https://www.mobilabs.fr).
* Released under the MIT license. You may obtain a copy of the License
* at: http://www.opensource.org/licenses/mit-license.php).
* Built from {{boiler:name}} v{{boiler:name:version}}.
* ************************************************************************** */
/*! Generated by Kadoo v1.2.0 */
/*! Generated by Kadoo v1.2.1 */
// ESLint declarations
/* global define */
/* eslint no-shadow: ['error', { 'allow': ['root'] }] */
Expand All @@ -17,7 +17,7 @@ const $__ES6GLOB = {};
(function(root, factory) {
'use strict';

/* istanbul ignore next */
/* c8 ignore start */
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([''], factory);
Expand All @@ -32,6 +32,7 @@ const $__ES6GLOB = {};
/* eslint-disable-next-line no-param-reassign */
root.ES6Kadoo = factory(root);
}
/* c8 ignore stop */
}($__ES6GLOB, (root) => {
'use strict';

Expand Down
100 changes: 77 additions & 23 deletions bin/es6kadoo.js
Expand Up @@ -39,10 +39,10 @@ const fs = require('fs')
;


// -- Local modules
// -- Local Modules


// -- Local Variables
// -- Local Constants
const defBoilerLib = 'ES6Kadoo'
/* eslint-disable-next-line object-curly-newline */
, defAuthor = { name: 'John Doe', acronym: 'jdo', email: 'jdo@johndoe.com', url: 'http://www.johndoe.com' }
Expand Down Expand Up @@ -71,17 +71,20 @@ const defBoilerLib = 'ES6Kadoo'
h: ['--help'],
v: ['--version', version],
p: ['--path'],
b: ['--boilerlib'],
n: ['--name'],
a: ['--author'],
c: ['--acronym'],
e: ['--email'],
u: ['--url'],
b: ['--boilerlib', defBoilerLib],
n: ['--name', defAuthor.name],
a: ['--author', defAuthor.name],
c: ['--acronym', defAuthor.acronym],
e: ['--email', defAuthor.email],
u: ['--url', defAuthor.url],
}
, parsed = nopt(opts, shortOpts, process.argv, 2)
;


// -- Local Variables


// -- Templates
const readme = [
'# {{lib:name}}',
Expand Down Expand Up @@ -138,23 +141,27 @@ const changelog = [

const index = [
"module.exports = require('./lib/{{lib:lowname}}');",
''].join('\n');
'',
].join('\n');

const gitignore = [
'.DS_Store',
'',
'coverage',
'node_modules',
''].join('\n');
'',
].join('\n');

const eslintignore = [
'_dist/lib/{{lib:lowname}}.min.*',
''].join('\n');
'',
].join('\n');

const npmignore = [
'*',
'!_dist/**/*',
''].join('\n');
'',
].join('\n');


// -- Private Functions --------------------------------------------------------
Expand Down Expand Up @@ -546,19 +553,66 @@ function _populate(options) {
process.stdout.write('Done. Enjoy!\n');
}

/**
* Runs the script.
*
* @function ()
* @private
* @param {} -,
* @returns {} -,
* @since 0.0.0
*/
function _run() {
if (parsed.help) {
_help();
}

// -- Main
if (parsed.help) {
_help();
}
if (parsed.version) {
process.stdout.write(`version: ${parsed.version}\n`);
return;
}

if (parsed.version) {
process.stdout.write(`version: ${parsed.version}\n`);
process.exit(0);
}
if (parsed.boilerlib) {
process.stdout.write(`boilerlib: ${parsed.boilerlib}\n`);
if (!parsed.argv.remain[0]) return;
}

if (parsed.name) {
process.stdout.write(`name: ${parsed.name}\n`);
if (!parsed.argv.remain[0]) return;
}

if (parsed.author) {
process.stdout.write(`author: ${parsed.author}\n`);
if (!parsed.argv.remain[0]) return;
}

if (parsed.acronym) {
process.stdout.write(`acronym: ${parsed.acronym}\n`);
if (!parsed.argv.remain[0]) return;
}

if (parsed.email) {
process.stdout.write(`email: ${parsed.email}\n`);
if (!parsed.argv.remain[0]) return;
}

if (parsed.url) {
process.stdout.write(`url: ${parsed.url}\n`);
if (!parsed.argv.remain[0]) return;
}

if (parsed.argv.remain[0] === 'populate') {
_populate(parsed);
return;
}

if (parsed.argv.remain[0] === 'populate') {
_populate(parsed);
} else {
_help();
}


// -- Where the script starts --------------------------------------------------
_run();


// -- oOo ---
5 changes: 3 additions & 2 deletions lib/es6kadoo.js
@@ -1,12 +1,12 @@
/*! Generated by Kadoo v1.2.0 */
/*! Generated by Kadoo v1.2.1 */
// ESLint declarations
/* global define */
/* eslint no-shadow: ['error', { 'allow': ['root'] }] */
/* eslint strict: ["error", "function"] */
(function(root, factory) {
'use strict';

/* istanbul ignore next */
/* c8 ignore start */
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([''], factory);
Expand All @@ -21,6 +21,7 @@
/* eslint-disable-next-line no-param-reassign */
root.ES6Kadoo = factory(root);
}
/* c8 ignore stop */
}(this, (root) => {
'use strict';

Expand Down
5 changes: 3 additions & 2 deletions lib/es6kadoo.mjs
@@ -1,4 +1,4 @@
/*! Generated by Kadoo v1.2.0 */
/*! Generated by Kadoo v1.2.1 */
// ESLint declarations
/* global define */
/* eslint no-shadow: ['error', { 'allow': ['root'] }] */
Expand All @@ -7,7 +7,7 @@ const $__ES6GLOB = {};
(function(root, factory) {
'use strict';

/* istanbul ignore next */
/* c8 ignore start */
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([''], factory);
Expand All @@ -22,6 +22,7 @@ const $__ES6GLOB = {};
/* eslint-disable-next-line no-param-reassign */
root.ES6Kadoo = factory(root);
}
/* c8 ignore stop */
}($__ES6GLOB, (root) => {
'use strict';

Expand Down

0 comments on commit 81efa99

Please sign in to comment.