dumi 2.0.0-rc.6 → 2.0.0-rc.7
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){var e={226:function(e){var n=Object.defineProperty;var t=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var __export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:true})};var __copyProps=(e,o,i,c)=>{if(o&&typeof o==="object"||typeof o==="function"){for(let s of r(o))if(!a.call(e,s)&&s!==i)n(e,s,{get:()=>o[s],enumerable:!(c=t(o,s))||c.enumerable})}return e};var __toCommonJS=e=>__copyProps(n({},"__esModule",{value:true}),e);var o={};__export(o,{default:()=>analytics_default});e.exports=__toCommonJS(o);var analytics_default=e=>{const n=process.env.GA_KEY;const t=process.env.GA_V2_KEY;const enableBy=e=>e.config.analytics||n;e.describe({key:"analytics",config:{schema(e){return e.alternatives().try(e.object({baidu:e.string(),ga:e.string(),ga_v2:e.string()}),e.boolean().invalid(true))},onChange:e.ConfigChangeType.reload},enableBy:enableBy});const baiduTpl=e=>`\n (function() {\n var hm = document.createElement('script');\n hm.src = '//hm.baidu.com/hm.js?${e}';\n var s = document.getElementsByTagName('script')[0];\n s.parentNode.insertBefore(hm, s);\n })();\n `;const gaTpl=e=>`\n (function(){\n if (!location.port) {\n (function (i, s, o, g, r, a, m) {\n i['GoogleAnalyticsObject'] = r;\n i[r] = i[r] || function () {\n (i[r].q = i[r].q || []).push(arguments)\n }, i[r].l = 1 * new Date();\n a = s.createElement(o),\n m = s.getElementsByTagName(o)[0];\n a.async = 1;\n a.src = g;\n m.parentNode.insertBefore(a, m)\n })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');\n ga('create', '${e}', 'auto');\n ga('send', 'pageview');\n }\n })();\n `;const gaV2Tpl=e=>`\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n gtag('config', '${e}');\n `.trim();e.addHTMLHeadScripts((()=>{const r=e.config.analytics||{};const{baidu:a,ga:o=n,ga_v2:i=t}=r;const c=[];if(a){c.push({content:"var _hmt = _hmt || [];"})}if(e.env!=="development"){if(a){c.push({content:baiduTpl(a)})}if(o){c.push({content:gaTpl(o)})}if(i){c.push({async:true,src:`//www.googletagmanager.com/gtag/js?id=${i}`},{content:gaV2Tpl(i)})}}return c.filter(Boolean)}))};0&&0}};var n={};function __nccwpck_require__(t){var r=n[t];if(r!==undefined){return r.exports}var a=n[t]={exports:{}};var o=true;try{e[t](a,a.exports,__nccwpck_require__);o=false}finally{if(o)delete n[t]}return a.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t=__nccwpck_require__(226);module.exports=t})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"@umijs/plugins","version":"4.0.30","authors":["chencheng <sorrycc@gmail.com> (https://github.com/sorrycc)"],"license":"MIT","_lastModified":"2022-11-13T07:05:33.094Z"}
|
|
@@ -118,7 +118,7 @@ var derivative_default = (api) => {
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
|
-
api.registerPlugins([require.resolve("
|
|
121
|
+
api.registerPlugins([require.resolve("../../compiled/@umijs/plugins")]);
|
|
122
122
|
};
|
|
123
123
|
// Annotate the CommonJS export names for ESM import in node:
|
|
124
124
|
0 && (module.exports = {
|
|
@@ -30,10 +30,12 @@ var import_plugin_utils = require("umi/plugin-utils");
|
|
|
30
30
|
function getComponentMapFromDir(globExp, dir) {
|
|
31
31
|
return import_plugin_utils.glob.sync(globExp, { cwd: dir }).reduce((ret, file) => {
|
|
32
32
|
const specifier = import_path.default.basename(file.replace(/(\/index)?\.[a-z]+$/, ""));
|
|
33
|
-
|
|
34
|
-
specifier
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
if (/^[A-Z\d]/.test(specifier)) {
|
|
34
|
+
ret[specifier] = {
|
|
35
|
+
specifier,
|
|
36
|
+
source: (0, import_plugin_utils.winPath)(import_path.default.join(dir, file))
|
|
37
|
+
};
|
|
38
|
+
}
|
|
37
39
|
return ret;
|
|
38
40
|
}, {});
|
|
39
41
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dumi",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.7",
|
|
4
4
|
"description": "Framework for developing UI components",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -59,7 +59,6 @@
|
|
|
59
59
|
"@types/mdast": "^3.0.10",
|
|
60
60
|
"@umijs/bundler-utils": "^4.0.30",
|
|
61
61
|
"@umijs/core": "^4.0.30",
|
|
62
|
-
"@umijs/plugins": "^4.0.30",
|
|
63
62
|
"codesandbox": "^2.2.3",
|
|
64
63
|
"deepmerge": "^4.2.2",
|
|
65
64
|
"dumi-afx-deps": "^1.0.0-alpha.1",
|
|
@@ -118,6 +117,7 @@
|
|
|
118
117
|
"@types/react-copy-to-clipboard": "^5.0.4",
|
|
119
118
|
"@types/react-helmet": "^6.1.5",
|
|
120
119
|
"@umijs/lint": "^4.0.30",
|
|
120
|
+
"@umijs/plugins": "^4.0.30",
|
|
121
121
|
"eslint": "^8.20.0",
|
|
122
122
|
"father": "^4.1.0",
|
|
123
123
|
"husky": "^8.0.1",
|