Skip to content

Commit

Permalink
Updated the project with @mobilabs/es6kadoo v2.1 (no Gulp, Github Act…
Browse files Browse the repository at this point in the history
…ions).
  • Loading branch information
jclo committed Jan 25, 2024
1 parent 24809c9 commit 5b8a54c
Show file tree
Hide file tree
Showing 28 changed files with 3,552 additions and 16,845 deletions.
18 changes: 9 additions & 9 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Set JavaScript language options
*/
"parserOptions": {
"sourceType": "script",
"sourceType": "script"
},
/**
* Set Environnement
Expand All @@ -22,13 +22,13 @@
"extends": "airbnb-base",
// Overwritten airbnb's rules:
"rules": {
strict: ["error", "global"],
func-names: ["error", "never"],
space-before-function-paren: ["error", { "anonymous": "never", "named": "never", "asyncArrow": "always" }],
no-plusplus: ["error", { "allowForLoopAfterthoughts": true }],
"no-multi-spaces": [2, { exceptions: { "VariableDeclarator": true } }],
comma-style: ["error", "first", { "exceptions": { "ArrayExpression": true, "ObjectExpression": true } }],
indent: ["error", 2, { "VariableDeclarator": { "const": 2 }, "SwitchCase": 1 }],
no-multiple-empty-lines: ["error", { "max": 2, "maxEOF": 0 }]
"strict": ["error", "global"],
"func-names": ["error", "never"],
"space-before-function-paren": ["error", { "anonymous": "never", "named": "never", "asyncArrow": "always" }],
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
"no-multi-spaces": [2, { "exceptions": { "VariableDeclarator": true } }],
"comma-style": ["error", "first", { "exceptions": { "ArrayExpression": true, "ObjectExpression": true } }],
"indent": ["error", 2, { "VariableDeclarator": { "const": 2 }, "SwitchCase": 1 }],
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 0 }]
}
}
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This workflow will run tests using node.
name: CI pipeline

on:
push:
branches: [ master, main ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install
- run: npm run build:dev
- run: npm test
- run: npm run check:coverage

- name: Coveralls
uses: coverallsapp/github-action@v2
# -- oOo --
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_*

.nyc_output
coverage
node_modules
6 changes: 3 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run build
npm run makedist
npm run build:dev
npm run build:prod
npm test
npm run check-coverage
npm run check:coverage
npm run report
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
### HEAD


### 1.0.4 (January 25, 2024)

* Updated the project with @mobilabs/es6kadoo v2.1 (no Gulp, Github Actions),
* ...,


### 1.0.3 (January 26, 2022)

* Updated the project dependencies,
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) 2022 Mobilabs <contact@mobilabs.fr> (http://www.mobilabs.fr)
Copyright (c) 2024 Mobilabs <contact@mobilabs.fr> (http://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
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@

[![NPM version][npm-image]][npm-url]
[![GitHub last commit][commit-image]][commit-url]
[![Travis CI][travis-image]][travis-url]
[![Github workflow][ci-image]][ci-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![npm bundle size][npm-bundle-size-image]][npm-bundle-size-url]
[![License][license-image]](LICENSE.md)
<!-- [![Dependencies status][dependencies-image]][dependencies-url]
[![Dev Dependencies status][devdependencies-image]][devdependencies-url] -->


`Messenger` is a tiny Javascript library to handle messages that carry a payload. It is designed to be embedded in another library. `Messenger` run on both Node.js and ECMAScript 2015 (ES6) compliant browsers.

Expand Down Expand Up @@ -69,19 +66,16 @@ Messenger.noConflict();
[npm-image]: https://img.shields.io/npm/v/@mobilabs/messenger.svg?logo=npm&logoColor=fff&label=NPM+package
[release-image]: https://img.shields.io/github/release/jclo/messenger.svg?include_prereleases
[commit-image]: https://img.shields.io/github/last-commit/jclo/messenger.svg?logo=github
[travis-image]: https://img.shields.io/travis/com/jclo/messenger.svg?logo=travis-ci&logoColor=fff
[ci-image]: https://github.com/jclo/messenger/actions/workflows/ci.yml/badge.svg
[coveralls-image]: https://img.shields.io/coveralls/jclo/messenger/master.svg?&logo=coveralls
[dependencies-image]: https://david-dm.org/jclo/messenger/status.svg?theme=shields.io
[devdependencies-image]: https://david-dm.org/jclo/messenger/dev-status.svg?theme=shields.io
[npm-bundle-size-image]: https://img.shields.io/bundlephobia/minzip/@mobilabs/messenger.svg
[license-image]: https://img.shields.io/npm/l/@mobilabs/messenger.svg

[npm-url]: https://www.npmjs.com/package/@mobilabs/messenger
[release-url]: https://github.com/jclo/messenger/tags
[commit-url]: https://github.com/jclo/messenger/commits/master
[travis-url]: https://app.travis-ci.com/jclo/messenger?branch=main
[ci-url]: https://github.com/jclo/messenger/actions/workflows/ci.yml
[coveralls-url]: https://coveralls.io/github/jclo/messenger?branch=master
[dependencies-url]: https://david-dm.org/jclo/messenger
[devdependencies-url]: https://david-dm.org/jclo/messenger?type=dev
[license-url]: http://opensource.org/licenses/MIT
[npm-bundle-size-url]: https://img.shields.io/bundlephobia/minzip/@mobilabs/messenger
[license-url]: http://opensource.org/licenses/MIT
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) 2022 Mobilabs <contact@mobilabs.fr> (http://www.mobilabs.fr)
Copyright (c) 2024 Mobilabs <contact@mobilabs.fr> (http://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
14 changes: 4 additions & 10 deletions _dist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@

[![NPM version][npm-image]][npm-url]
[![GitHub last commit][commit-image]][commit-url]
[![Travis CI][travis-image]][travis-url]
[![Github workflow][ci-image]][ci-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![npm bundle size][npm-bundle-size-image]][npm-bundle-size-url]
[![License][license-image]](LICENSE.md)
<!-- [![Dependencies status][dependencies-image]][dependencies-url]
[![Dev Dependencies status][devdependencies-image]][devdependencies-url] -->


`Messenger` is a tiny Javascript library to handle messages that carry a payload. It is designed to be embedded in another library. `Messenger` run on both Node.js and ECMAScript 2015 (ES6) compliant browsers.

Expand Down Expand Up @@ -69,19 +66,16 @@ Messenger.noConflict();
[npm-image]: https://img.shields.io/npm/v/@mobilabs/messenger.svg?logo=npm&logoColor=fff&label=NPM+package
[release-image]: https://img.shields.io/github/release/jclo/messenger.svg?include_prereleases
[commit-image]: https://img.shields.io/github/last-commit/jclo/messenger.svg?logo=github
[travis-image]: https://img.shields.io/travis/com/jclo/messenger.svg?logo=travis-ci&logoColor=fff
[ci-image]: https://github.com/jclo/messenger/actions/workflows/ci.yml/badge.svg
[coveralls-image]: https://img.shields.io/coveralls/jclo/messenger/master.svg?&logo=coveralls
[dependencies-image]: https://david-dm.org/jclo/messenger/status.svg?theme=shields.io
[devdependencies-image]: https://david-dm.org/jclo/messenger/dev-status.svg?theme=shields.io
[npm-bundle-size-image]: https://img.shields.io/bundlephobia/minzip/@mobilabs/messenger.svg
[license-image]: https://img.shields.io/npm/l/@mobilabs/messenger.svg

[npm-url]: https://www.npmjs.com/package/@mobilabs/messenger
[release-url]: https://github.com/jclo/messenger/tags
[commit-url]: https://github.com/jclo/messenger/commits/master
[travis-url]: https://app.travis-ci.com/jclo/messenger?branch=main
[ci-url]: https://github.com/jclo/messenger/actions/workflows/ci.yml
[coveralls-url]: https://coveralls.io/github/jclo/messenger?branch=master
[dependencies-url]: https://david-dm.org/jclo/messenger
[devdependencies-url]: https://david-dm.org/jclo/messenger?type=dev
[license-url]: http://opensource.org/licenses/MIT
[npm-bundle-size-url]: https://img.shields.io/bundlephobia/minzip/@mobilabs/messenger
[license-url]: http://opensource.org/licenses/MIT
7 changes: 4 additions & 3 deletions _dist/lib/messenger.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
*
* A tiny Javascript library to handle messages that carry a payload.
* (you can download it from npm or github repositories)
* Copyright (c) 2022 Mobilabs <contact@mobilabs.fr> (http://www.mobilabs.fr).
* Copyright (c) 2024 Mobilabs <contact@mobilabs.fr> (http://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 ES6lib v1.0.13.
* Built from ES6lib v2.1.1.
* ************************************************************************** */
// ESLint declarations
/* global define */
/* 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 @@ -29,6 +29,7 @@
/* eslint-disable-next-line no-param-reassign */
root.Messenger = factory(root);
}
/* c8 ignore stop */
}(this, (root) => {
'use strict';

Expand Down
4 changes: 2 additions & 2 deletions _dist/lib/messenger.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/messenger.min.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*
* A tiny Javascript library to handle messages that carry a payload.
* (you can download it from npm or github repositories)
* Copyright (c) 2022 Mobilabs <contact@mobilabs.fr> (http://www.mobilabs.fr).
* Copyright (c) 2024 Mobilabs <contact@mobilabs.fr> (http://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 ES6lib v1.0.13.
* Built from ES6lib v2.1.1.
* ************************************************************************** */
const $__ES6GLOB={};!function(e,t){"use strict";"function"==typeof define&&define.amd?define([""],t):"object"==typeof exports?module.exports=t(e):e.Messenger=t(e)}($__ES6GLOB,(e=>{"use strict";let t,n;return function(){const s=e.Messenger;let r;t=function(){const e=Object.create(r);return e._library={name:"Messenger",version:"1.0.3"},e._db={},e},t.NAME="Messenger",t.VERSION="1.0.3",t._setTestMode=function(){return[]},t.noConflict=function(){return e.Messenger=s,this},r={whoami(){return this._library},subscribe(e,t){return n.subscribe(this._db,e,t),this},subscribeOnce(e,t){return n.subscribeOnce(this._db,e,t),this},unsubscribe(e,t){return n.unsubscribe(this._db,e,t),this},publish(e,t){return n.publish(this._db,e,t),this}}}(),function(){function e(e,t){"string"==typeof t&&function(e,t){Object.prototype.hasOwnProperty.call(e,t)||(e[t]={listeners:[],listenersOnce:[]})}(e,t)}n={subscribe(t,n,s){!function(t,n,s){e(t,n),"string"==typeof n&&"function"==typeof s&&Object.prototype.hasOwnProperty.call(t,n)&&t[n].listeners.push(s)}(t,n,s)},subscribeOnce(t,n,s){!function(t,n,s){e(t,n),"string"==typeof n&&"function"==typeof s&&Object.prototype.hasOwnProperty.call(t,n)&&t[n].listenersOnce.push(s)}(t,n,s)},unsubscribe(e,t,n){!function(e,t,n){let s;"string"==typeof t&&"function"==typeof n&&Object.prototype.hasOwnProperty.call(e,t)&&(s=e[t].listeners.indexOf(n),s>=0&&e[t].listeners.splice(s,1),s=e[t].listenersOnce.indexOf(n),s>=0&&e[t].listenersOnce.splice(s,1))}(e,t,n)},publish(e,t,n){!function(e,t,n){if("string"==typeof t&&Object.prototype.hasOwnProperty.call(e,t)){for(let s=0;s<e[t].listeners.length;s++)e[t].listeners[s](n);for(let s=0;s<e[t].listenersOnce.length;s++)e[t].listenersOnce[s](n);e[t].listenersOnce.splice(0,e[t].listenersOnce.length)}}(e,t,n)}}}(),t}));export default $__ES6GLOB.Messenger;
7 changes: 4 additions & 3 deletions _dist/lib/messenger.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
*
* A tiny Javascript library to handle messages that carry a payload.
* (you can download it from npm or github repositories)
* Copyright (c) 2022 Mobilabs <contact@mobilabs.fr> (http://www.mobilabs.fr).
* Copyright (c) 2024 Mobilabs <contact@mobilabs.fr> (http://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 ES6lib v1.0.13.
* Built from ES6lib v2.1.1.
* ************************************************************************** */
// ESLint declarations
/* global define */
Expand All @@ -15,7 +15,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 @@ -30,6 +30,7 @@ const $__ES6GLOB = {};
/* eslint-disable-next-line no-param-reassign */
root.Messenger = factory(root);
}
/* c8 ignore stop */
}($__ES6GLOB, (root) => {
'use strict';

Expand Down
65 changes: 0 additions & 65 deletions gulpfile.js

This file was deleted.

3 changes: 2 additions & 1 deletion lib/messenger.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
(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 @@ -19,6 +19,7 @@
/* eslint-disable-next-line no-param-reassign */
root.Messenger = factory(root);
}
/* c8 ignore stop */
}(this, (root) => {
'use strict';

Expand Down
3 changes: 2 additions & 1 deletion lib/messenger.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,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 @@ -20,6 +20,7 @@ const $__ES6GLOB = {};
/* eslint-disable-next-line no-param-reassign */
root.Messenger = factory(root);
}
/* c8 ignore stop */
}($__ES6GLOB, (root) => {
'use strict';

Expand Down

0 comments on commit 5b8a54c

Please sign in to comment.