@moneko/core 2.0.1-8.1 → 2.0.1-8.3

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/build/seo.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"seo",{enumerable:true,get:function(){return seo}});var _fs=require("fs");var _path=require("path");var _common=require("./common");var _processEnv=require("./process-env");var _webpackCommon=require("./webpack.common");function getLibDocsPages(dir,domain,basename){var results=[];var list=(0,_fs.readdirSync)(dir);list.forEach(function(_file){if(_file==="static"){return false}var file=dir+"/"+_file;var stat=(0,_fs.statSync)(file);if(stat&&stat.isDirectory()){results=results.concat(getLibDocsPages(file,domain,basename))}else if(file.endsWith("README.mdx")){results.push("https://"+domain+basename+file.replace(_processEnv.PROGRAMPATH+"/components/","").replace("/README.mdx",""))}});return results}var seo=function(){var _ref=_common.CONFIG.seo||{},domain=_ref.domain,nojekyll=_ref.nojekyll;if(!domain){return}var baseDir=(_webpackCommon.outputConfig===null||_webpackCommon.outputConfig===void 0?void 0:_webpackCommon.outputConfig.path)||process.cwd();var call=function(err){if(err){throw err}};(0,_fs.writeFile)((0,_path.join)(baseDir,"CNAME"),domain,"utf-8",call);(0,_fs.writeFile)((0,_path.join)(baseDir,"robots"),"Sitemap: https://".concat(domain).concat(_common.CONFIG.routeBaseName,"sitemap.txt"),"utf-8",call);var sitemap="";switch(_processEnv.APPTYPE){case"library":sitemap=getLibDocsPages((0,_path.join)(_processEnv.PROGRAMPATH,"./components"),domain,_common.CONFIG.routeBaseName).join("\n");break;case"single-component":case"mobile":case"site":case"back-stage":case"single-spa":default:break}(0,_fs.writeFile)((0,_path.join)(baseDir,"sitemap.txt"),sitemap,"utf-8",call);if(nojekyll){(0,_fs.writeFile)((0,_path.join)(baseDir,".nojekyll"),"","utf-8",call)}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"seo",{enumerable:true,get:function(){return seo}});var _fs=require("fs");var _path=require("path");var _common=require("./common");var _processEnv=require("./process-env");var _utils=require("./utils");var _webpackCommon=require("./webpack.common");function getLibDocsPages(dir,domain,basename){var results=[];var list=(0,_fs.readdirSync)(dir);list.forEach(function(_file){if(_file==="static"){return false}var file=dir+"/"+_file;var stat=(0,_fs.statSync)(file);if(stat&&stat.isDirectory()){results=results.concat(getLibDocsPages(file,domain,basename))}else if(file.endsWith("README.mdx")){results.push("https://"+domain+basename+file.replace(_processEnv.PROGRAMPATH+"/components/","").replace("/README.mdx",""))}});return results}var seo=function(){var _ref=_common.CONFIG.seo||{},domain=_ref.domain,nojekyll=_ref.nojekyll,path=_ref.path;if(!domain){return}var baseDir=path&&(0,_utils.resolveProgramPath)(path)||(_webpackCommon.outputConfig===null||_webpackCommon.outputConfig===void 0?void 0:_webpackCommon.outputConfig.path)||process.cwd();var call=function(err){if(err){throw err}};(0,_fs.writeFile)((0,_path.join)(baseDir,"CNAME"),domain,"utf-8",call);(0,_fs.writeFile)((0,_path.join)(baseDir,"robots"),"Sitemap: https://".concat(domain).concat(_common.CONFIG.routeBaseName,"sitemap.txt"),"utf-8",call);var sitemap="";switch(_processEnv.APPTYPE){case"library":sitemap=getLibDocsPages((0,_path.join)(_processEnv.PROGRAMPATH,"./components"),domain,_common.CONFIG.routeBaseName).join("\n");break;case"single-component":case"mobile":case"site":case"back-stage":case"single-spa":default:break}(0,_fs.writeFile)((0,_path.join)(baseDir,"sitemap.txt"),sitemap,"utf-8",call);if(nojekyll){(0,_fs.writeFile)((0,_path.join)(baseDir,".nojekyll"),"","utf-8",call)}};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/core",
3
- "version": "2.0.18.1",
3
+ "version": "2.0.18.3",
4
4
  "description": "core",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -194,6 +194,8 @@ export declare type ConfigType<T = 'tsc'> = {
194
194
  * @default true
195
195
  **/
196
196
  nojekyll?: boolean;
197
+ /** 文件输出路径 */
198
+ path?: string;
197
199
  }
198
200
  | false;
199
201
  /** 📦 打包完成 */