@merkur/integration-custom-element 0.34.5
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/LICENSE +7 -0
- package/README.md +47 -0
- package/lib/index.cjs +60 -0
- package/lib/index.es9.cjs +54 -0
- package/lib/index.es9.mjs +52 -0
- package/lib/index.js +60 -0
- package/lib/index.mjs +58 -0
- package/lib/index.umd.js +1 -0
- package/package.json +60 -0
- package/rollup.config.mjs +11 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright 2020 Miroslav Jancarik jancarikmiroslav@gmail.com
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://merkur.js.org/docs/getting-started" title="Getting started">
|
|
3
|
+
<img src="https://raw.githubusercontent.com/mjancarik/merkur/master/images/merkur-illustration.png" width="100px" height="100px" alt="Merkur illustration"/>
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
# Merkur
|
|
8
|
+
|
|
9
|
+
[](https://github.com/mjancarik/merkur/actions/workflows/ci.yml)
|
|
10
|
+
[](https://www.npmjs.com/package/@merkur/core)
|
|
11
|
+

|
|
12
|
+
[](https://github.com/prettier/prettier)
|
|
13
|
+
|
|
14
|
+
The [Merkur](https://merkur.js.org/) is tiny extensible javascript library for front-end microservices(micro frontends). It allows by default server side rendering for loading performance boost. You can connect it with other frameworks or languages because merkur defines easy API. You can use one of six predefined template's library [Preact](https://preactjs.com/), [µhtml](https://github.com/WebReflection/uhtml#readme), [Svelte](https://svelte.dev/) and [vanilla](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) but you can easily extend for others.
|
|
15
|
+
|
|
16
|
+
## Features
|
|
17
|
+
- Flexible templating engine
|
|
18
|
+
- Usable with all tech stacks
|
|
19
|
+
- SSR-ready by default
|
|
20
|
+
- Easy extensible with plugins
|
|
21
|
+
- Tiny - 1 KB minified + gzipped
|
|
22
|
+
|
|
23
|
+
## Getting started
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx @merkur/create-widget <name>
|
|
27
|
+
|
|
28
|
+
cd name
|
|
29
|
+
|
|
30
|
+
npm run dev // Point your browser at http://localhost:4444/
|
|
31
|
+
```
|
|
32
|
+

|
|
33
|
+
## Documentation
|
|
34
|
+
|
|
35
|
+
To check out [live demo](https://merkur.js.org/demo) and [docs](https://merkur.js.org/docs), visit [https://merkur.js.org](https://merkur.js.org).
|
|
36
|
+
|
|
37
|
+
## Contribution
|
|
38
|
+
|
|
39
|
+
Contribute to this project via [Pull-Requests](https://github.com/mjancarik/merkur/pulls).
|
|
40
|
+
|
|
41
|
+
We are following [Conventional Commits Specification](https://www.conventionalcommits.org/en/v1.0.0/#summary). To simplify the commit process, you can use `npm run commit` command. It opens an interactive interface, which should help you with commit message composition.
|
|
42
|
+
|
|
43
|
+
Thank you to all the people who already contributed to Merkur!
|
|
44
|
+
|
|
45
|
+
<a href="https://github.com/mjancarik/merkur/graphs/contributors">
|
|
46
|
+
<img src="https://contrib.rocks/image?repo=mjancarik/merkur" />
|
|
47
|
+
</a>
|
package/lib/index.cjs
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@merkur/core');
|
|
4
|
+
var integration = require('@merkur/integration');
|
|
5
|
+
|
|
6
|
+
async function createSPAWidget(widgetDefinition) {
|
|
7
|
+
const definition = {
|
|
8
|
+
...widgetDefinition,
|
|
9
|
+
createWidget: widgetDefinition.createWidget || core.createMerkurWidget,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
core.getMerkur().register(definition);
|
|
13
|
+
|
|
14
|
+
await afterDOMLoad();
|
|
15
|
+
await integration.loadAssets(definition.assets, definition.container);
|
|
16
|
+
|
|
17
|
+
return await core.getMerkur().create(definition);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function afterDOMLoad() {
|
|
21
|
+
return new Promise((resolve) => {
|
|
22
|
+
if (typeof document !== 'undefined') {
|
|
23
|
+
if (document.readyState !== 'loading') {
|
|
24
|
+
resolve();
|
|
25
|
+
} else {
|
|
26
|
+
window.addEventListener('DOMContentLoaded', () => {
|
|
27
|
+
resolve();
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
} else {
|
|
31
|
+
resolve();
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function registerCustomElement({ widgetDefinition }) {
|
|
37
|
+
class WidgetElement extends HTMLElement {
|
|
38
|
+
constructor() {
|
|
39
|
+
super();
|
|
40
|
+
|
|
41
|
+
const shadow = this.attachShadow({ mode: 'open' });
|
|
42
|
+
|
|
43
|
+
(async () => {
|
|
44
|
+
try {
|
|
45
|
+
widgetDefinition.container = widgetDefinition.container || shadow;
|
|
46
|
+
const widget = await createSPAWidget(widgetDefinition);
|
|
47
|
+
await widget.mount();
|
|
48
|
+
} catch (error) {
|
|
49
|
+
console.error(error);
|
|
50
|
+
}
|
|
51
|
+
})();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (customElements.get(widgetDefinition.name) === undefined) {
|
|
56
|
+
customElements.define(widgetDefinition.name, WidgetElement);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
exports.registerCustomElement = registerCustomElement;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@merkur/core');
|
|
4
|
+
var integration = require('@merkur/integration');
|
|
5
|
+
async function createSPAWidget(widgetDefinition) {
|
|
6
|
+
const definition = {
|
|
7
|
+
...widgetDefinition,
|
|
8
|
+
createWidget: widgetDefinition.createWidget || core.createMerkurWidget
|
|
9
|
+
};
|
|
10
|
+
core.getMerkur().register(definition);
|
|
11
|
+
await afterDOMLoad();
|
|
12
|
+
await integration.loadAssets(definition.assets, definition.container);
|
|
13
|
+
return await core.getMerkur().create(definition);
|
|
14
|
+
}
|
|
15
|
+
function afterDOMLoad() {
|
|
16
|
+
return new Promise(resolve => {
|
|
17
|
+
if (typeof document !== 'undefined') {
|
|
18
|
+
if (document.readyState !== 'loading') {
|
|
19
|
+
resolve();
|
|
20
|
+
} else {
|
|
21
|
+
window.addEventListener('DOMContentLoaded', () => {
|
|
22
|
+
resolve();
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
} else {
|
|
26
|
+
resolve();
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function registerCustomElement({
|
|
31
|
+
widgetDefinition
|
|
32
|
+
}) {
|
|
33
|
+
class WidgetElement extends HTMLElement {
|
|
34
|
+
constructor() {
|
|
35
|
+
super();
|
|
36
|
+
const shadow = this.attachShadow({
|
|
37
|
+
mode: 'open'
|
|
38
|
+
});
|
|
39
|
+
(async () => {
|
|
40
|
+
try {
|
|
41
|
+
widgetDefinition.container = widgetDefinition.container || shadow;
|
|
42
|
+
const widget = await createSPAWidget(widgetDefinition);
|
|
43
|
+
await widget.mount();
|
|
44
|
+
} catch (error) {
|
|
45
|
+
console.error(error);
|
|
46
|
+
}
|
|
47
|
+
})();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (customElements.get(widgetDefinition.name) === undefined) {
|
|
51
|
+
customElements.define(widgetDefinition.name, WidgetElement);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.registerCustomElement = registerCustomElement;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { createMerkurWidget, getMerkur } from '@merkur/core';
|
|
2
|
+
import { loadAssets } from '@merkur/integration';
|
|
3
|
+
async function createSPAWidget(widgetDefinition) {
|
|
4
|
+
const definition = {
|
|
5
|
+
...widgetDefinition,
|
|
6
|
+
createWidget: widgetDefinition.createWidget || createMerkurWidget
|
|
7
|
+
};
|
|
8
|
+
getMerkur().register(definition);
|
|
9
|
+
await afterDOMLoad();
|
|
10
|
+
await loadAssets(definition.assets, definition.container);
|
|
11
|
+
return await getMerkur().create(definition);
|
|
12
|
+
}
|
|
13
|
+
function afterDOMLoad() {
|
|
14
|
+
return new Promise(resolve => {
|
|
15
|
+
if (typeof document !== 'undefined') {
|
|
16
|
+
if (document.readyState !== 'loading') {
|
|
17
|
+
resolve();
|
|
18
|
+
} else {
|
|
19
|
+
window.addEventListener('DOMContentLoaded', () => {
|
|
20
|
+
resolve();
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
} else {
|
|
24
|
+
resolve();
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function registerCustomElement({
|
|
29
|
+
widgetDefinition
|
|
30
|
+
}) {
|
|
31
|
+
class WidgetElement extends HTMLElement {
|
|
32
|
+
constructor() {
|
|
33
|
+
super();
|
|
34
|
+
const shadow = this.attachShadow({
|
|
35
|
+
mode: 'open'
|
|
36
|
+
});
|
|
37
|
+
(async () => {
|
|
38
|
+
try {
|
|
39
|
+
widgetDefinition.container = widgetDefinition.container || shadow;
|
|
40
|
+
const widget = await createSPAWidget(widgetDefinition);
|
|
41
|
+
await widget.mount();
|
|
42
|
+
} catch (error) {
|
|
43
|
+
console.error(error);
|
|
44
|
+
}
|
|
45
|
+
})();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (customElements.get(widgetDefinition.name) === undefined) {
|
|
49
|
+
customElements.define(widgetDefinition.name, WidgetElement);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export { registerCustomElement };
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@merkur/core');
|
|
4
|
+
var integration = require('@merkur/integration');
|
|
5
|
+
|
|
6
|
+
async function createSPAWidget(widgetDefinition) {
|
|
7
|
+
const definition = {
|
|
8
|
+
...widgetDefinition,
|
|
9
|
+
createWidget: widgetDefinition.createWidget || core.createMerkurWidget,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
core.getMerkur().register(definition);
|
|
13
|
+
|
|
14
|
+
await afterDOMLoad();
|
|
15
|
+
await integration.loadAssets(definition.assets, definition.container);
|
|
16
|
+
|
|
17
|
+
return await core.getMerkur().create(definition);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function afterDOMLoad() {
|
|
21
|
+
return new Promise((resolve) => {
|
|
22
|
+
if (typeof document !== 'undefined') {
|
|
23
|
+
if (document.readyState !== 'loading') {
|
|
24
|
+
resolve();
|
|
25
|
+
} else {
|
|
26
|
+
window.addEventListener('DOMContentLoaded', () => {
|
|
27
|
+
resolve();
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
} else {
|
|
31
|
+
resolve();
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function registerCustomElement({ widgetDefinition }) {
|
|
37
|
+
class WidgetElement extends HTMLElement {
|
|
38
|
+
constructor() {
|
|
39
|
+
super();
|
|
40
|
+
|
|
41
|
+
const shadow = this.attachShadow({ mode: 'open' });
|
|
42
|
+
|
|
43
|
+
(async () => {
|
|
44
|
+
try {
|
|
45
|
+
widgetDefinition.container = widgetDefinition.container || shadow;
|
|
46
|
+
const widget = await createSPAWidget(widgetDefinition);
|
|
47
|
+
await widget.mount();
|
|
48
|
+
} catch (error) {
|
|
49
|
+
console.error(error);
|
|
50
|
+
}
|
|
51
|
+
})();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (customElements.get(widgetDefinition.name) === undefined) {
|
|
56
|
+
customElements.define(widgetDefinition.name, WidgetElement);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
exports.registerCustomElement = registerCustomElement;
|
package/lib/index.mjs
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { createMerkurWidget, getMerkur } from '@merkur/core';
|
|
2
|
+
import { loadAssets } from '@merkur/integration';
|
|
3
|
+
|
|
4
|
+
async function createSPAWidget(widgetDefinition) {
|
|
5
|
+
const definition = {
|
|
6
|
+
...widgetDefinition,
|
|
7
|
+
createWidget: widgetDefinition.createWidget || createMerkurWidget,
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
getMerkur().register(definition);
|
|
11
|
+
|
|
12
|
+
await afterDOMLoad();
|
|
13
|
+
await loadAssets(definition.assets, definition.container);
|
|
14
|
+
|
|
15
|
+
return await getMerkur().create(definition);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function afterDOMLoad() {
|
|
19
|
+
return new Promise((resolve) => {
|
|
20
|
+
if (typeof document !== 'undefined') {
|
|
21
|
+
if (document.readyState !== 'loading') {
|
|
22
|
+
resolve();
|
|
23
|
+
} else {
|
|
24
|
+
window.addEventListener('DOMContentLoaded', () => {
|
|
25
|
+
resolve();
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
} else {
|
|
29
|
+
resolve();
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function registerCustomElement({ widgetDefinition }) {
|
|
35
|
+
class WidgetElement extends HTMLElement {
|
|
36
|
+
constructor() {
|
|
37
|
+
super();
|
|
38
|
+
|
|
39
|
+
const shadow = this.attachShadow({ mode: 'open' });
|
|
40
|
+
|
|
41
|
+
(async () => {
|
|
42
|
+
try {
|
|
43
|
+
widgetDefinition.container = widgetDefinition.container || shadow;
|
|
44
|
+
const widget = await createSPAWidget(widgetDefinition);
|
|
45
|
+
await widget.mount();
|
|
46
|
+
} catch (error) {
|
|
47
|
+
console.error(error);
|
|
48
|
+
}
|
|
49
|
+
})();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (customElements.get(widgetDefinition.name) === undefined) {
|
|
54
|
+
customElements.define(widgetDefinition.name, WidgetElement);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export { registerCustomElement };
|
package/lib/index.umd.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}!function(e,t){if("function"==typeof define&&define.amd)define("@merkur/integration-custom-element",["exports","@merkur/core","@merkur/integration"],t);else if("undefined"!=typeof exports)t(exports,require("@merkur/core"),require("@merkur/integration"));else{var r={exports:{}};t(r.exports,e.Merkur.Core,e.Merkur.Integration),e.merkurIntegrationCustomElement=r.exports}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:this,(function(t,r,n){function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t,r){return(t=f(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function f(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==e(r)?r:String(r)}function a(e){var t="function"==typeof Map?new Map:void 0;return a=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(l())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&p(o,r.prototype),o}(e,arguments,s(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),p(r,e)},a(e)}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function y(e,t,r,n,o,i,u){try{var c=e[i](u),f=c.value}catch(e){return void r(e)}c.done?t(f):Promise.resolve(f).then(n,o)}function b(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function u(e){y(i,n,o,u,c,"next",e)}function c(e){y(i,n,o,u,c,"throw",e)}u(void 0)}))}}function d(){return(d=b((function*(e){var t=i(i({},e),{},{createWidget:e.createWidget||r.createMerkurWidget});return(0,r.getMerkur)().register(t),yield new Promise((function(e){"undefined"!=typeof document?"loading"!==document.readyState?e():window.addEventListener("DOMContentLoaded",(function(){e()})):e()})),yield(0,n.loadAssets)(t.assets,t.container),yield(0,r.getMerkur)().create(t)}))).apply(this,arguments)}Object.defineProperty(t,"__esModule",{value:!0}),t.registerCustomElement=function(t){var r=t.widgetDefinition,n=function(t){function n(){var t,o,i,u;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),o=this,i=s(i=n);var c=(t=function(t,r){if(r&&("object"===e(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(o,l()?Reflect.construct(i,u||[],s(o).constructor):i.apply(o,u))).attachShadow({mode:"open"});return b((function*(){try{r.container=r.container||c;var e=yield function(e){return d.apply(this,arguments)}(r);yield e.mount()}catch(e){console.error(e)}}))(),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(n,t),function(e,t,r){t&&c(e.prototype,t);r&&c(e,r);return Object.defineProperty(e,"prototype",{writable:!1}),e}(n)}(a(HTMLElement));void 0===customElements.get(r.name)&&customElements.define(r.name,n)}}));
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@merkur/integration-custom-element",
|
|
3
|
+
"version": "0.34.5",
|
|
4
|
+
"description": "Merkur module for easy integration with other apps with custom element.",
|
|
5
|
+
"main": "lib/index",
|
|
6
|
+
"module": "lib/index",
|
|
7
|
+
"unpkg": "lib/index.umd.js",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./lib/index.mjs",
|
|
12
|
+
"require": "./lib/index.cjs"
|
|
13
|
+
},
|
|
14
|
+
"./lib/index.es9.mjs": "./lib/index.es9.mjs",
|
|
15
|
+
"./lib/index.es9.cjs": "./lib/index.es9.cjs",
|
|
16
|
+
"./server": "./server/index.js",
|
|
17
|
+
"./server/": "./server/index.js",
|
|
18
|
+
"./server/index.js": "./server/index.js"
|
|
19
|
+
},
|
|
20
|
+
"browser": {
|
|
21
|
+
"./lib/index.js": "./lib/index.js",
|
|
22
|
+
"./lib/index.cjs": "./lib/index.cjs",
|
|
23
|
+
"./lib/index.mjs": "./lib/index.mjs",
|
|
24
|
+
"./lib/index.es9.mjs": "./lib/index.es9.mjs"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"preversion": "npm test",
|
|
28
|
+
"test": "jest --no-watchman -c ./jest.config.js",
|
|
29
|
+
"test:es:version": "es-check es11 ./lib/index.mjs --module && es-check es9 ./lib/index.es9.mjs --module && es-check es9 ./lib/index.es9.cjs --module",
|
|
30
|
+
"build": "rollup -c rollup.config.mjs",
|
|
31
|
+
"prepare": "npm run build"
|
|
32
|
+
},
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "git+https://github.com/mjancarik/merkur.git"
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"merkur",
|
|
39
|
+
"integration"
|
|
40
|
+
],
|
|
41
|
+
"author": "Miroslav Jancarik",
|
|
42
|
+
"license": "ISC",
|
|
43
|
+
"bugs": {
|
|
44
|
+
"url": "https://github.com/mjancarik/merkur/issues"
|
|
45
|
+
},
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"registry": "https://registry.npmjs.org/",
|
|
48
|
+
"access": "public"
|
|
49
|
+
},
|
|
50
|
+
"homepage": "https://merkur.js.org/",
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@merkur/core": "^0.34.0",
|
|
53
|
+
"@merkur/integration": "^0.34.0"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"@merkur/core": "*",
|
|
57
|
+
"@merkur/integration": "*"
|
|
58
|
+
},
|
|
59
|
+
"gitHead": "ad686581d92da82eac89cc892a0f71a5c3519e70"
|
|
60
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createRollupESConfig,
|
|
3
|
+
createRollupES9Config,
|
|
4
|
+
createRollupUMDConfig,
|
|
5
|
+
} from '../../createRollupConfig.mjs';
|
|
6
|
+
|
|
7
|
+
let esConfig = createRollupESConfig();
|
|
8
|
+
let es9Config = createRollupES9Config();
|
|
9
|
+
let umdConfig = createRollupUMDConfig();
|
|
10
|
+
|
|
11
|
+
export default [esConfig, es9Config, umdConfig];
|