Skip to content

Commit

Permalink
Updated the project with @mobilabs/es6kadoo v2.1.1 (improved build sc…
Browse files Browse the repository at this point in the history
…ripts).
  • Loading branch information
jclo committed Feb 9, 2024
1 parent cbae275 commit 694db07
Show file tree
Hide file tree
Showing 24 changed files with 536 additions and 396 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.DS_Store
__trash
_old_*
__old_*
z_*

_dist-*
Expand Down
3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
### HEAD

### 2.1.1 (February 9, 2024)

* Updated the project with @mobilabs/es6kadoo v2.1.1 (improved build scripts),
* ...,


### 2.1.0 (January 20, 2024)

* Updated the project with @mobilabs/es6kadoo v2.1.0,
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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/es6pakket.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
*
* A boilerplate for building Javascript ES6 libraries with Pakket.
* (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 Pakket v1.2.0 */
/*! Generated by Pakket v1.2.1 */
/* 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 @@ -30,6 +30,7 @@
/* eslint-disable-next-line no-param-reassign */
root.ES6Pakket = factory(root);
}
/* c8 ignore stop */
/* eslint-disable-next-line */
}(this,(root)=>{"use strict";return function(){/* istanbul ignore next */function e(t,n,o){function r(f){function i(e){const n=t[f][2][e];return r(n||e)}if(!n[f]){if(!t[f]){throw new Error(`Cannot find module "${f}"`)}n[f]={exports:{}};const r=n[f];t[f][1].call(r.exports,i,r,r.exports,e,t,n,o)}return n[f].exports}for(let e=0;e<o.length;e++){r(o[e])}return r}return e}()({

Expand Down
4 changes: 2 additions & 2 deletions _dist/lib/es6pakket.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/es6pakket.min.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
*
* A boilerplate for building Javascript ES6 libraries with Pakket.
* (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 Pakket v1.2.0 */
/*! Generated by Pakket 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.ES6Pakket=e(t)}($__ES6GLOB,(t=>{"use strict";return function t(e,r,n){function o(i){function u(t){return o(e[i][2][t]||t)}if(!r[i]){if(!e[i])throw new Error(`Cannot find module "${i}"`);r[i]={exports:{}};const o=r[i];e[i][1].call(o.exports,u,o,o.exports,t,e,r,n)}return r[i].exports}for(let t=0;t<n.length;t++)o(n[t]);return o}({1:["./src/prototypal",function(e,r,n){const o=e("./util/util"),i=t.ES6Pakket;let u;const s=function(){const t=Object.create(u);return t._library={name:"ES6Pakket",version:"2.1.0"},t};s.NAME="ES6Pakket",s.VERSION="2.1.0",s._setTestMode=function(){return[]},s.noConflict=function(){return t.ES6Pakket=i,this},u={whoami(){return this._library},getString:()=>o.getString(),getArray:()=>o.getArray()},r.exports=s},{"./util/util":2}],2:["./src/util/util",function(t,e,r){const n={getString:()=>"I am a string!",getArray:()=>[1,2,3]};e.exports=n},{}]},{},[1])(1)}));export default $__ES6GLOB.ES6Pakket;
7 changes: 4 additions & 3 deletions _dist/lib/es6pakket.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
*
* A boilerplate for building Javascript ES6 libraries with Pakket.
* (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 Pakket v1.2.0 */
/*! Generated by Pakket v1.2.1 */
/* global define */
/* eslint no-shadow: ['error', { 'allow': ['root'] }] */
/* eslint strict: ["error", "function"] */
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 @@ -31,6 +31,7 @@ const $__ES6GLOB = {};
/* eslint-disable-next-line no-param-reassign */
root.ES6Pakket = factory(root);
}
/* c8 ignore stop */
/* eslint-disable-next-line */
}($__ES6GLOB,(root)=>{"use strict";return function(){/* istanbul ignore next */function e(t,n,o){function r(f){function i(e){const n=t[f][2][e];return r(n||e)}if(!n[f]){if(!t[f]){throw new Error(`Cannot find module "${f}"`)}n[f]={exports:{}};const r=n[f];t[f][1].call(r.exports,i,r,r.exports,e,t,n,o)}return n[f].exports}for(let e=0;e<o.length;e++){r(o[e])}return r}return e}()({

Expand Down
102 changes: 78 additions & 24 deletions bin/es6pakket.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Nota:
* es6pakket.js is a copy and paste of es6kadoo.js with a few minor changes
* (https://github.com/jclo/es6pakket/blob/master/bin/es6pakket.js).
* (https://github.com/jclo/es6kadoo/blob/master/bin/es6kadoo.js).
*
* The MIT License (MIT)
*
Expand Down Expand Up @@ -39,10 +39,10 @@ const fs = require('fs')
;


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


// -- Local Variables
// -- Local Constants
const defBoilerLib = 'ES6Pakket'
/* 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 = 'ES6Pakket'
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/es6pakket.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*! Generated by Pakket v1.2.0 */
/*! Generated by Pakket v1.2.1 */
/* 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 @@ -20,6 +20,7 @@
/* eslint-disable-next-line no-param-reassign */
root.ES6Pakket = factory(root);
}
/* c8 ignore stop */
/* eslint-disable-next-line */
}(this,(root)=>{"use strict";return function(){/* istanbul ignore next */function e(t,n,o){function r(f){function i(e){const n=t[f][2][e];return r(n||e)}if(!n[f]){if(!t[f]){throw new Error(`Cannot find module "${f}"`)}n[f]={exports:{}};const r=n[f];t[f][1].call(r.exports,i,r,r.exports,e,t,n,o)}return n[f].exports}for(let e=0;e<o.length;e++){r(o[e])}return r}return e}()({

Expand Down
5 changes: 3 additions & 2 deletions lib/es6pakket.mjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*! Generated by Pakket v1.2.0 */
/*! Generated by Pakket v1.2.1 */
/* global define */
/* eslint no-shadow: ['error', { 'allow': ['root'] }] */
/* eslint strict: ["error", "function"] */
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 @@ -21,6 +21,7 @@ const $__ES6GLOB = {};
/* eslint-disable-next-line no-param-reassign */
root.ES6Pakket = factory(root);
}
/* c8 ignore stop */
/* eslint-disable-next-line */
}($__ES6GLOB,(root)=>{"use strict";return function(){/* istanbul ignore next */function e(t,n,o){function r(f){function i(e){const n=t[f][2][e];return r(n||e)}if(!n[f]){if(!t[f]){throw new Error(`Cannot find module "${f}"`)}n[f]={exports:{}};const r=n[f];t[f][1].call(r.exports,i,r,r.exports,e,t,n,o)}return n[f].exports}for(let e=0;e<o.length;e++){r(o[e])}return r}return e}()({

Expand Down
Loading

0 comments on commit 694db07

Please sign in to comment.