changed completely webpack config due to a bug in export
This commit is contained in:
parent
0ecd52d017
commit
49a165d733
1
.cache/00/9ef7b19eb04a9f1d0860ab79fc2e23.json
Normal file
1
.cache/00/9ef7b19eb04a9f1d0860ab79fc2e23.json
Normal file
File diff suppressed because one or more lines are too long
1
.cache/04/5dac7e76b593ee57935ba1591f0b00.json
Normal file
1
.cache/04/5dac7e76b593ee57935ba1591f0b00.json
Normal file
File diff suppressed because one or more lines are too long
1
.cache/10/f802e639971699945af2d410e1fb27.json
Normal file
1
.cache/10/f802e639971699945af2d410e1fb27.json
Normal file
File diff suppressed because one or more lines are too long
1
.cache/3d/63b9740f8f3e74e72287ae3589e281.json
Normal file
1
.cache/3d/63b9740f8f3e74e72287ae3589e281.json
Normal file
File diff suppressed because one or more lines are too long
1
.cache/54/6d4dfccc920e1981da7e744b66d5fa.json
Normal file
1
.cache/54/6d4dfccc920e1981da7e744b66d5fa.json
Normal file
File diff suppressed because one or more lines are too long
1
.cache/58/5d9d8963c395af9ecec20a5568f045.json
Normal file
1
.cache/58/5d9d8963c395af9ecec20a5568f045.json
Normal file
File diff suppressed because one or more lines are too long
1
.cache/80/d4cbf4d048cf845828c40008a5999a.json
Normal file
1
.cache/80/d4cbf4d048cf845828c40008a5999a.json
Normal file
File diff suppressed because one or more lines are too long
1
.cache/ab/ebc1508379cdd015c672d00fe50ff3.json
Normal file
1
.cache/ab/ebc1508379cdd015c672d00fe50ff3.json
Normal file
File diff suppressed because one or more lines are too long
1
.cache/b9/fd6ba46782f8e91cc0c673dcdcb9a2.json
Normal file
1
.cache/b9/fd6ba46782f8e91cc0c673dcdcb9a2.json
Normal file
File diff suppressed because one or more lines are too long
@ -4,4 +4,4 @@ const presets = [
|
|||||||
"@babel/preset-typescript",
|
"@babel/preset-typescript",
|
||||||
];
|
];
|
||||||
|
|
||||||
module.exports = { presets };
|
module.exports = { presets, sourceMaps: true };
|
||||||
|
2
dist/mailgo.min.js
vendored
2
dist/mailgo.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,5 +1,14 @@
|
|||||||
module.exports =
|
(function webpackUniversalModuleDefinition(root, factory) {
|
||||||
/******/ (function(modules) { // webpackBootstrap
|
if(typeof exports === 'object' && typeof module === 'object')
|
||||||
|
module.exports = factory();
|
||||||
|
else if(typeof define === 'function' && define.amd)
|
||||||
|
define([], factory);
|
||||||
|
else if(typeof exports === 'object')
|
||||||
|
exports["mailgo"] = factory();
|
||||||
|
else
|
||||||
|
root["mailgo"] = factory();
|
||||||
|
})(typeof self !== 'undefined' ? self : this, function() {
|
||||||
|
return /******/ (function(modules) { // webpackBootstrap
|
||||||
/******/ // The module cache
|
/******/ // The module cache
|
||||||
/******/ var installedModules = {};
|
/******/ var installedModules = {};
|
||||||
/******/
|
/******/
|
||||||
@ -82,19 +91,155 @@ module.exports =
|
|||||||
/******/
|
/******/
|
||||||
/******/
|
/******/
|
||||||
/******/ // Load entry module and return exports
|
/******/ // Load entry module and return exports
|
||||||
/******/ return __webpack_require__(__webpack_require__.s = 0);
|
/******/ return __webpack_require__(__webpack_require__.s = 4);
|
||||||
/******/ })
|
/******/ })
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ([
|
/******/ ([
|
||||||
/* 0 */
|
/* 0 */
|
||||||
|
/***/ (function(module) {
|
||||||
|
|
||||||
|
module.exports = JSON.parse("{\"languages\":[\"en\",\"it\"],\"translations\":{\"en\":{\"open_in\":\"open in \",\"cc_\":\"cc \",\"bcc_\":\"bcc \",\"subject_\":\"subject \",\"body_\":\"body \",\"gmail\":\"Gmail\",\"outlook\":\"Outlook\",\"telegram\":\"Telegram\",\"whatsapp\":\"WhatsApp\",\"skype\":\"Skype\",\"call\":\"call\",\"open\":\"open\",\"_default\":\" default\",\"_as_default\":\" as default\",\"copy\":\"copy\"},\"it\":{\"open_in\":\"apri con \",\"cc\":\"cc \",\"bcc\":\"ccn \",\"subject\":\"oggetto \",\"body\":\"testo \",\"gmail\":\"Gmail\",\"outlook\":\"Outlook\",\"telegram\":\"Telegram\",\"whatsapp\":\"WhatsApp\",\"skype\":\"Skype\",\"call\":\"chiama\",\"open\":\"apri\",\"_default\":\" \",\"_as_default\":\" \",\"copy\":\"copia\"}}}");
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
/* 1 */
|
||||||
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
|
|
||||||
|
var result = __webpack_require__(2);
|
||||||
|
|
||||||
|
if (typeof result === "string") {
|
||||||
|
module.exports = result;
|
||||||
|
} else {
|
||||||
|
module.exports = result.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
/* 2 */
|
||||||
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
|
// Imports
|
||||||
|
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(3);
|
||||||
|
exports = ___CSS_LOADER_API_IMPORT___(false);
|
||||||
|
// Module
|
||||||
|
exports.push([module.i, ".m-modal{position:fixed;top:0;right:0;bottom:0;left:0;justify-content:center;align-items:center;flex-direction:column;overflow:hidden;font-size:15px;z-index:10000}.m-modal p,.m-modal span,.m-modal strong,.m-modal a{margin:0;padding:0;font-size:100%;line-height:1;font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\";text-rendering:optimizeLegibility}.m-modal strong{font-weight:700}.m-modal .m-modal-back{position:absolute;z-index:10001;top:0;right:0;bottom:0;left:0;background-color:rgba(32,35,42,0.75);opacity:0.8}.m-modal .m-modal-content{position:relative;z-index:10002;box-sizing:content-box;text-align:center;min-width:200px;max-width:240px;background-color:#fff;opacity:0.97;border-radius:8px;box-shadow:0px 3px 20px rgba(32,35,42,0.5);color:#4a4a4a;display:flex;flex-direction:column;overflow:auto;padding:20px;transition:0.5s box-shadow}.m-modal .m-modal-content:hover{opacity:1;box-shadow:0px 7px 20px rgba(32,35,42,0.85)}.m-modal .m-modal-content .m-title{margin-bottom:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.m-modal .m-modal-content .m-details{margin-bottom:10px}.m-modal .m-modal-content .m-details p{font-size:12px;margin-top:3px;margin-bottom:3px}.m-modal .m-modal-content a{padding:10px;color:#4a4a4a;border-radius:8px;text-decoration:none}.m-modal .m-modal-content a.m-gmail{color:#d44638}.m-modal .m-modal-content a.m-gmail:hover{background-color:rgba(212,70,56,0.08);color:#d44638}.m-modal .m-modal-content a.m-outlook{color:#0072c6}.m-modal .m-modal-content a.m-outlook:hover{background-color:rgba(0,114,198,0.08);color:#0072c6}.m-modal .m-modal-content a.m-tg{color:#08c}.m-modal .m-modal-content a.m-tg:hover{background-color:rgba(0,114,198,0.08);color:#08c}.m-modal .m-modal-content a.m-wa{color:#00bfa5}.m-modal .m-modal-content a.m-wa:hover{background-color:rgba(0,191,165,0.08);color:#00bfa5}.m-modal .m-modal-content a.m-skype{color:#00aff0}.m-modal .m-modal-content a.m-skype:hover{background-color:rgba(0,175,240,0.08);color:#00aff0}.m-modal .m-modal-content a.m-copy{padding:16px 10px;font-size:16px}.m-modal .m-modal-content a.m-default:hover,.m-modal .m-modal-content a.m-copy:hover{background-color:rgba(0,0,0,0.08);color:#4a4a4a}.m-modal .m-modal-content a.m-by{font-size:8px;margin-top:0.8rem;padding:5px;color:#4a4a4a;opacity:0.5}.m-modal .m-modal-content a.m-by:hover{opacity:1}.m-modal .m-modal-content .w-500{font-weight:500}\n", ""]);
|
||||||
|
// Exports
|
||||||
|
module.exports = exports;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
/* 3 */
|
||||||
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
||||||
|
Author Tobias Koppers @sokra
|
||||||
|
*/
|
||||||
|
// css base code, injected by the css-loader
|
||||||
|
// eslint-disable-next-line func-names
|
||||||
|
module.exports = function (useSourceMap) {
|
||||||
|
var list = []; // return the list of modules as css string
|
||||||
|
|
||||||
|
list.toString = function toString() {
|
||||||
|
return this.map(function (item) {
|
||||||
|
var content = cssWithMappingToString(item, useSourceMap);
|
||||||
|
|
||||||
|
if (item[2]) {
|
||||||
|
return "@media ".concat(item[2], " {").concat(content, "}");
|
||||||
|
}
|
||||||
|
|
||||||
|
return content;
|
||||||
|
}).join('');
|
||||||
|
}; // import a list of modules into the list
|
||||||
|
// eslint-disable-next-line func-names
|
||||||
|
|
||||||
|
|
||||||
|
list.i = function (modules, mediaQuery, dedupe) {
|
||||||
|
if (typeof modules === 'string') {
|
||||||
|
// eslint-disable-next-line no-param-reassign
|
||||||
|
modules = [[null, modules, '']];
|
||||||
|
}
|
||||||
|
|
||||||
|
var alreadyImportedModules = {};
|
||||||
|
|
||||||
|
if (dedupe) {
|
||||||
|
for (var i = 0; i < this.length; i++) {
|
||||||
|
// eslint-disable-next-line prefer-destructuring
|
||||||
|
var id = this[i][0];
|
||||||
|
|
||||||
|
if (id != null) {
|
||||||
|
alreadyImportedModules[id] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var _i = 0; _i < modules.length; _i++) {
|
||||||
|
var item = [].concat(modules[_i]);
|
||||||
|
|
||||||
|
if (dedupe && alreadyImportedModules[item[0]]) {
|
||||||
|
// eslint-disable-next-line no-continue
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mediaQuery) {
|
||||||
|
if (!item[2]) {
|
||||||
|
item[2] = mediaQuery;
|
||||||
|
} else {
|
||||||
|
item[2] = "".concat(mediaQuery, " and ").concat(item[2]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
list.push(item);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return list;
|
||||||
|
};
|
||||||
|
|
||||||
|
function cssWithMappingToString(item, useSourceMap) {
|
||||||
|
var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring
|
||||||
|
|
||||||
|
var cssMapping = item[3];
|
||||||
|
|
||||||
|
if (!cssMapping) {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (useSourceMap && typeof btoa === 'function') {
|
||||||
|
var sourceMapping = toComment(cssMapping);
|
||||||
|
var sourceURLs = cssMapping.sources.map(function (source) {
|
||||||
|
return "/*# sourceURL=".concat(cssMapping.sourceRoot || '').concat(source, " */");
|
||||||
|
});
|
||||||
|
return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
|
||||||
|
}
|
||||||
|
|
||||||
|
return [content].join('\n');
|
||||||
|
} // Adapted from convert-source-map (MIT)
|
||||||
|
|
||||||
|
|
||||||
|
function toComment(sourceMap) {
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
|
||||||
|
var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
|
||||||
|
return "/*# ".concat(data, " */");
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
/* 4 */
|
||||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
// ESM COMPAT FLAG
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
|
||||||
|
// CONCATENATED MODULE: ./mailgo.ts
|
||||||
// i18n for mailgo
|
// i18n for mailgo
|
||||||
const i18n = __webpack_require__(1);
|
const i18n = __webpack_require__(0);
|
||||||
// mailgo css
|
// mailgo css
|
||||||
const mailgoCSS = __webpack_require__(2).toString();
|
const mailgoCSS = __webpack_require__(1).toString();
|
||||||
// default lang
|
// default lang
|
||||||
const DEFAULT_LANG = "en";
|
const DEFAULT_LANG = "en";
|
||||||
// links
|
// links
|
||||||
@ -115,7 +260,7 @@ let tel = "", msg = "", telegramUsername = "", skypeUsername = "";
|
|||||||
// the DOM elements
|
// the DOM elements
|
||||||
let title, titleTel, detailCc, detailBcc, detailSubject, detailBody, ccValue, bccValue, subjectValue, bodyValue;
|
let title, titleTel, detailCc, detailBcc, detailSubject, detailBody, ccValue, bccValue, subjectValue, bodyValue;
|
||||||
// mailgo buttons (actions)
|
// mailgo buttons (actions)
|
||||||
let gmail, outlook, open, telegram, wa, skype, call, copyMail, copyTel;
|
let gmail, outlook, mailgo_open, telegram, wa, skype, call, copyMail, copyTel;
|
||||||
/**
|
/**
|
||||||
* mailgoInit
|
* mailgoInit
|
||||||
* the function that creates the mailgo elements in DOM
|
* the function that creates the mailgo elements in DOM
|
||||||
@ -227,17 +372,17 @@ const mailgoInit = (mailgoConfig) => {
|
|||||||
outlook.appendChild(outlookSpan);
|
outlook.appendChild(outlookSpan);
|
||||||
modalContent.appendChild(outlook);
|
modalContent.appendChild(outlook);
|
||||||
// open default
|
// open default
|
||||||
open = createElement("a");
|
mailgo_open = createElement("a");
|
||||||
open.id = "m-open";
|
mailgo_open.id = "m-open";
|
||||||
open.href = DEFAULT_BTN_HREF;
|
mailgo_open.href = DEFAULT_BTN_HREF;
|
||||||
open.classList.add("m-open");
|
mailgo_open.classList.add("m-open");
|
||||||
open.classList.add("m-default");
|
mailgo_open.classList.add("m-default");
|
||||||
let openSpan = createElement(span);
|
let openSpan = createElement(span);
|
||||||
openSpan.className = "w-500";
|
openSpan.className = "w-500";
|
||||||
openSpan.appendChild(createTextNode(strings.open || defaultStrings.open));
|
openSpan.appendChild(createTextNode(strings.open || defaultStrings.open));
|
||||||
open.appendChild(openSpan);
|
mailgo_open.appendChild(openSpan);
|
||||||
open.appendChild(createTextNode(strings._default || defaultStrings._default));
|
mailgo_open.appendChild(createTextNode(strings._default || defaultStrings._default));
|
||||||
modalContent.appendChild(open);
|
modalContent.appendChild(mailgo_open);
|
||||||
// copy
|
// copy
|
||||||
copyMail = createElement("a");
|
copyMail = createElement("a");
|
||||||
copyMail.id = "m-copy";
|
copyMail.id = "m-copy";
|
||||||
@ -411,7 +556,7 @@ const mailgoRender = (type = MAIL_TYPE, mailgo) => {
|
|||||||
gmail.addEventListener("click", openGmail);
|
gmail.addEventListener("click", openGmail);
|
||||||
outlook.addEventListener("click", openOutlook);
|
outlook.addEventListener("click", openOutlook);
|
||||||
encEmail = encodeEmail(mail);
|
encEmail = encodeEmail(mail);
|
||||||
open.addEventListener("click", openDefault);
|
mailgo_open.addEventListener("click", openDefault);
|
||||||
copyMail.addEventListener("click", () => copy(mail));
|
copyMail.addEventListener("click", () => copy(mail));
|
||||||
}
|
}
|
||||||
// mailgo tel
|
// mailgo tel
|
||||||
@ -780,7 +925,7 @@ const mailgoStyle = () => {
|
|||||||
document.head.appendChild(mailgoCSSElement);
|
document.head.appendChild(mailgoCSSElement);
|
||||||
};
|
};
|
||||||
// mailgo
|
// mailgo
|
||||||
function mailgo(mailgoConfig) {
|
const mailgo = (mailgoConfig) => {
|
||||||
// if the window is defined...
|
// if the window is defined...
|
||||||
if (window && typeof window !== "undefined") {
|
if (window && typeof window !== "undefined") {
|
||||||
// add the style for mailgo
|
// add the style for mailgo
|
||||||
@ -795,142 +940,15 @@ function mailgo(mailgoConfig) {
|
|||||||
mailgoInit(mailgoConfig);
|
mailgoInit(mailgoConfig);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
/* harmony default export */ __webpack_exports__["default"] = (mailgo);
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
/* 1 */
|
|
||||||
/***/ (function(module) {
|
|
||||||
|
|
||||||
module.exports = JSON.parse("{\"languages\":[\"en\",\"it\"],\"translations\":{\"en\":{\"open_in\":\"open in \",\"cc_\":\"cc \",\"bcc_\":\"bcc \",\"subject_\":\"subject \",\"body_\":\"body \",\"gmail\":\"Gmail\",\"outlook\":\"Outlook\",\"telegram\":\"Telegram\",\"whatsapp\":\"WhatsApp\",\"skype\":\"Skype\",\"call\":\"call\",\"open\":\"open\",\"_default\":\" default\",\"_as_default\":\" as default\",\"copy\":\"copy\"},\"it\":{\"open_in\":\"apri con \",\"cc\":\"cc \",\"bcc\":\"ccn \",\"subject\":\"oggetto \",\"body\":\"testo \",\"gmail\":\"Gmail\",\"outlook\":\"Outlook\",\"telegram\":\"Telegram\",\"whatsapp\":\"WhatsApp\",\"skype\":\"Skype\",\"call\":\"chiama\",\"open\":\"apri\",\"_default\":\" \",\"_as_default\":\" \",\"copy\":\"copia\"}}}");
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
/* 2 */
|
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
|
||||||
|
|
||||||
|
|
||||||
var result = __webpack_require__(3);
|
|
||||||
|
|
||||||
if (typeof result === "string") {
|
|
||||||
module.exports = result;
|
|
||||||
} else {
|
|
||||||
module.exports = result.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
/* 3 */
|
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
|
||||||
|
|
||||||
// Imports
|
|
||||||
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(4);
|
|
||||||
exports = ___CSS_LOADER_API_IMPORT___(false);
|
|
||||||
// Module
|
|
||||||
exports.push([module.i, ".m-modal{position:fixed;top:0;right:0;bottom:0;left:0;justify-content:center;align-items:center;flex-direction:column;overflow:hidden;font-size:15px;z-index:10000}.m-modal p,.m-modal span,.m-modal strong,.m-modal a{margin:0;padding:0;font-size:100%;line-height:1;font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\";text-rendering:optimizeLegibility}.m-modal strong{font-weight:700}.m-modal .m-modal-back{position:absolute;z-index:10001;top:0;right:0;bottom:0;left:0;background-color:rgba(32,35,42,0.75);opacity:0.8}.m-modal .m-modal-content{position:relative;z-index:10002;box-sizing:content-box;text-align:center;min-width:200px;max-width:240px;background-color:#fff;opacity:0.97;border-radius:8px;box-shadow:0px 3px 20px rgba(32,35,42,0.5);color:#4a4a4a;display:flex;flex-direction:column;overflow:auto;padding:20px;transition:0.5s box-shadow}.m-modal .m-modal-content:hover{opacity:1;box-shadow:0px 7px 20px rgba(32,35,42,0.85)}.m-modal .m-modal-content .m-title{margin-bottom:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.m-modal .m-modal-content .m-details{margin-bottom:10px}.m-modal .m-modal-content .m-details p{font-size:12px;margin-top:3px;margin-bottom:3px}.m-modal .m-modal-content a{padding:10px;color:#4a4a4a;border-radius:8px;text-decoration:none}.m-modal .m-modal-content a.m-gmail{color:#d44638}.m-modal .m-modal-content a.m-gmail:hover{background-color:rgba(212,70,56,0.08);color:#d44638}.m-modal .m-modal-content a.m-outlook{color:#0072c6}.m-modal .m-modal-content a.m-outlook:hover{background-color:rgba(0,114,198,0.08);color:#0072c6}.m-modal .m-modal-content a.m-tg{color:#08c}.m-modal .m-modal-content a.m-tg:hover{background-color:rgba(0,114,198,0.08);color:#08c}.m-modal .m-modal-content a.m-wa{color:#00bfa5}.m-modal .m-modal-content a.m-wa:hover{background-color:rgba(0,191,165,0.08);color:#00bfa5}.m-modal .m-modal-content a.m-skype{color:#00aff0}.m-modal .m-modal-content a.m-skype:hover{background-color:rgba(0,175,240,0.08);color:#00aff0}.m-modal .m-modal-content a.m-copy{padding:16px 10px;font-size:16px}.m-modal .m-modal-content a.m-default:hover,.m-modal .m-modal-content a.m-copy:hover{background-color:rgba(0,0,0,0.08);color:#4a4a4a}.m-modal .m-modal-content a.m-by{font-size:8px;margin-top:0.8rem;padding:5px;color:#4a4a4a;opacity:0.5}.m-modal .m-modal-content a.m-by:hover{opacity:1}.m-modal .m-modal-content .w-500{font-weight:500}\n", ""]);
|
|
||||||
// Exports
|
|
||||||
module.exports = exports;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
/* 4 */
|
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
||||||
Author Tobias Koppers @sokra
|
|
||||||
*/
|
|
||||||
// css base code, injected by the css-loader
|
|
||||||
// eslint-disable-next-line func-names
|
|
||||||
module.exports = function (useSourceMap) {
|
|
||||||
var list = []; // return the list of modules as css string
|
|
||||||
|
|
||||||
list.toString = function toString() {
|
|
||||||
return this.map(function (item) {
|
|
||||||
var content = cssWithMappingToString(item, useSourceMap);
|
|
||||||
|
|
||||||
if (item[2]) {
|
|
||||||
return "@media ".concat(item[2], " {").concat(content, "}");
|
|
||||||
}
|
|
||||||
|
|
||||||
return content;
|
|
||||||
}).join('');
|
|
||||||
}; // import a list of modules into the list
|
|
||||||
// eslint-disable-next-line func-names
|
|
||||||
|
|
||||||
|
|
||||||
list.i = function (modules, mediaQuery, dedupe) {
|
|
||||||
if (typeof modules === 'string') {
|
|
||||||
// eslint-disable-next-line no-param-reassign
|
|
||||||
modules = [[null, modules, '']];
|
|
||||||
}
|
|
||||||
|
|
||||||
var alreadyImportedModules = {};
|
|
||||||
|
|
||||||
if (dedupe) {
|
|
||||||
for (var i = 0; i < this.length; i++) {
|
|
||||||
// eslint-disable-next-line prefer-destructuring
|
|
||||||
var id = this[i][0];
|
|
||||||
|
|
||||||
if (id != null) {
|
|
||||||
alreadyImportedModules[id] = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var _i = 0; _i < modules.length; _i++) {
|
|
||||||
var item = [].concat(modules[_i]);
|
|
||||||
|
|
||||||
if (dedupe && alreadyImportedModules[item[0]]) {
|
|
||||||
// eslint-disable-next-line no-continue
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mediaQuery) {
|
|
||||||
if (!item[2]) {
|
|
||||||
item[2] = mediaQuery;
|
|
||||||
} else {
|
|
||||||
item[2] = "".concat(mediaQuery, " and ").concat(item[2]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
list.push(item);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return list;
|
|
||||||
};
|
};
|
||||||
|
/* harmony default export */ var mailgo_0 = (mailgo);
|
||||||
|
|
||||||
function cssWithMappingToString(item, useSourceMap) {
|
// CONCATENATED MODULE: ./mailgo.lib.ts
|
||||||
var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring
|
// webpack > lib/mailgo.js
|
||||||
|
|
||||||
var cssMapping = item[3];
|
/* harmony default export */ var mailgo_lib = __webpack_exports__["default"] = (mailgo_0);
|
||||||
|
|
||||||
if (!cssMapping) {
|
|
||||||
return content;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (useSourceMap && typeof btoa === 'function') {
|
|
||||||
var sourceMapping = toComment(cssMapping);
|
|
||||||
var sourceURLs = cssMapping.sources.map(function (source) {
|
|
||||||
return "/*# sourceURL=".concat(cssMapping.sourceRoot || '').concat(source, " */");
|
|
||||||
});
|
|
||||||
return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
|
|
||||||
}
|
|
||||||
|
|
||||||
return [content].join('\n');
|
|
||||||
} // Adapted from convert-source-map (MIT)
|
|
||||||
|
|
||||||
|
|
||||||
function toComment(sourceMap) {
|
|
||||||
// eslint-disable-next-line no-undef
|
|
||||||
var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
|
|
||||||
var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
|
|
||||||
return "/*# ".concat(data, " */");
|
|
||||||
}
|
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
/******/ ]);
|
/******/ ])["default"];
|
||||||
|
});
|
@ -10,8 +10,9 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/manzinello/mailgo.git"
|
"url": "git+https://github.com/manzinello/mailgo.git"
|
||||||
},
|
},
|
||||||
"main": "./mailgo.main.js",
|
"main": "./lib/mailgo.js",
|
||||||
"module": "./mailgo.main.js",
|
"module": "./lib/mailgo.js",
|
||||||
|
"typings": "./mailgo.d.ts",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"mailto",
|
"mailto",
|
||||||
"mail",
|
"mail",
|
||||||
@ -39,9 +40,10 @@
|
|||||||
"@babel/parser": "^7.10.3",
|
"@babel/parser": "^7.10.3",
|
||||||
"@babel/preset-env": "^7.10.3",
|
"@babel/preset-env": "^7.10.3",
|
||||||
"@babel/preset-flow": "^7.10.1",
|
"@babel/preset-flow": "^7.10.1",
|
||||||
"@babel/preset-typescript": "^7.10.1",
|
"@babel/preset-typescript": "^7.10.4",
|
||||||
"@babel/types": "^7.10.3",
|
"@babel/types": "^7.10.3",
|
||||||
"css-loader": "^3.6.0",
|
"css-loader": "^3.6.0",
|
||||||
|
"cssnano": "^4.1.10",
|
||||||
"flow-bin": "^0.128.0",
|
"flow-bin": "^0.128.0",
|
||||||
"jest": "^26.1.0",
|
"jest": "^26.1.0",
|
||||||
"mini-css-extract-plugin": "^0.9.0",
|
"mini-css-extract-plugin": "^0.9.0",
|
||||||
@ -51,6 +53,7 @@
|
|||||||
"to-string-loader": "^1.1.6",
|
"to-string-loader": "^1.1.6",
|
||||||
"ts-loader": "^7.0.5",
|
"ts-loader": "^7.0.5",
|
||||||
"typescript": "^3.9.5",
|
"typescript": "^3.9.5",
|
||||||
|
"uglifyjs-webpack-plugin": "^2.2.0",
|
||||||
"webpack": "^4.43.0",
|
"webpack": "^4.43.0",
|
||||||
"webpack-cli": "^3.3.12"
|
"webpack-cli": "^3.3.12"
|
||||||
},
|
},
|
||||||
|
5
src/mailgo.lib.ts
Normal file
5
src/mailgo.lib.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
// webpack > lib/mailgo.js
|
||||||
|
|
||||||
|
import mailgo from "./mailgo";
|
||||||
|
|
||||||
|
export default mailgo;
|
@ -893,7 +893,7 @@ const mailgoStyle = (): void => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// mailgo
|
// mailgo
|
||||||
function mailgo(mailgoConfig?: MailgoConfig) {
|
export const mailgo = (mailgoConfig?: MailgoConfig) => {
|
||||||
// if the window is defined...
|
// if the window is defined...
|
||||||
if (window && typeof window !== "undefined") {
|
if (window && typeof window !== "undefined") {
|
||||||
// add the style for mailgo
|
// add the style for mailgo
|
||||||
@ -908,6 +908,6 @@ function mailgo(mailgoConfig?: MailgoConfig) {
|
|||||||
mailgoInit(mailgoConfig);
|
mailgoInit(mailgoConfig);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
export default mailgo;
|
export default mailgo;
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// webpack > dist/mailgo.min.js
|
||||||
|
|
||||||
import mailgo from "./mailgo";
|
import mailgo from "./mailgo";
|
||||||
|
|
||||||
// call init mailgo attached to the event DOMContentLoaded
|
// call init mailgo attached to the event DOMContentLoaded
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
|
||||||
|
|
||||||
const mailgoRules = [
|
const mailgoRules = [
|
||||||
{
|
{
|
||||||
@ -11,6 +12,16 @@ const mailgoRules = [
|
|||||||
test: /\.s[ac]ss$/i,
|
test: /\.s[ac]ss$/i,
|
||||||
use: ["to-string-loader", "css-loader", "sass-loader"],
|
use: ["to-string-loader", "css-loader", "sass-loader"],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
test: /\.m?js$/,
|
||||||
|
exclude: /(node_modules|bower_components)/,
|
||||||
|
use: {
|
||||||
|
loader: "babel-loader",
|
||||||
|
options: {
|
||||||
|
presets: ["@babel/preset-env"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
module.exports = [
|
module.exports = [
|
||||||
@ -29,9 +40,10 @@ module.exports = [
|
|||||||
path: path.resolve(__dirname, "dist"),
|
path: path.resolve(__dirname, "dist"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
mode: "production",
|
mode: "production",
|
||||||
entry: "./mailgo.ts",
|
entry: "./mailgo.lib.ts",
|
||||||
context: path.join(__dirname, "src"),
|
context: path.join(__dirname, "src"),
|
||||||
module: {
|
module: {
|
||||||
rules: mailgoRules,
|
rules: mailgoRules,
|
||||||
@ -39,11 +51,16 @@ module.exports = [
|
|||||||
optimization: {
|
optimization: {
|
||||||
minimize: false,
|
minimize: false,
|
||||||
},
|
},
|
||||||
|
resolve: {
|
||||||
|
extensions: [".ts", ".js"],
|
||||||
|
},
|
||||||
output: {
|
output: {
|
||||||
filename: "mailgo.main.js",
|
filename: "lib/mailgo.js",
|
||||||
library: "mailgo",
|
library: "mailgo",
|
||||||
libraryTarget: "commonjs2",
|
libraryTarget: "umd",
|
||||||
auxiliaryComment: "mailgo",
|
libraryExport: "default",
|
||||||
|
globalObject: "typeof self !== 'undefined' ? self : this",
|
||||||
|
// auxiliaryComment: "mailgo",
|
||||||
path: path.resolve(__dirname),
|
path: path.resolve(__dirname),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user