🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@holajs/plugin-platform-gmuapp

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@holajs/plugin-platform-gmuapp - npm Package Compare versions

Comparing version
0.1.14
to
0.1.15
+1
-1
dist/index.js

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("path"),t=require("fs-extra"),n=require("shelljs"),o=require("@tarojs/plugin-platform-weapp");function i(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var r=i(e),a=i(t),u=i(n);function p(e,t,n,o){return new(n||(n=Promise))((function(i,r){function a(e){try{p(o.next(e))}catch(e){r(e)}}function u(e){try{p(o.throw(e))}catch(e){r(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}p((o=o.apply(e,t||[])).next())}))}let s=!1;function c(e,t){if(e&&t)try{const n="gmuConf.js",o=`module.exports = ${JSON.stringify(e)}`;a.writeFileSync(r.join(t,n),o)}catch(e){console.warn(e)}}exports.default=(e,t)=>{let n="gmu";"gmuapp"===e.runOpts.options.platform&&(a.emptyDirSync(e.paths.outputPath),e.initialConfig.outputRoot=r.join(e.initialConfig.outputRoot,"src"),e.paths.outputPath=r.join(e.paths.outputPath,"src"),e.initialConfig.gmuapp&&(n="gmuapp")),e.registerPlatform({name:"gmuapp",useConfigName:n,fn({config:n}){return p(this,void 0,void 0,(function*(){e.modifyBuildAssets((({miniPlugin:t})=>{var n,o,i;const u=[],p=(null===(o=null===(n=t.appConfig)||void 0===n?void 0:n.window)||void 0===o?void 0:o.pullDownRefreshIconPath)||"";p&&u.push(p),t.pages.forEach((e=>{const n=t.filesConfig[t.getConfigFilePath(e.name)].content.pullDownRefreshIconPath;n&&u.push(n)})),u.forEach((t=>{const n=r.join(e.paths.sourcePath,t),o=r.join(e.paths.outputPath,t);a.ensureDirSync(o.slice(0,o.lastIndexOf(r.sep))),a.copyFileSync(n,o)})),c(null===(i=t.appConfig)||void 0===i?void 0:i.gmuConfig,e.paths.outputPath)}));const i=r.join(e.paths.appPath,n.nativePath||"native"),u=r.join(e.paths.outputPath.replace(/(\/|\\)src(\/|\\)?$/,""),"native");a.ensureDir(i),a.copy(i,u),e.generateFrameworkInfo(),e.generateProjectConfig({srcConfigName:"project.gmuapp.json",distConfigName:"../project.json"});const p=new o.Weapp(e,n,t||{});yield p.start()}))}}),e.onBuildFinish((()=>{var t,n,o;const{options:i,config:r}=e.runOpts;if("gmuapp"===i.platform&&!s){s=!0;const a=e.paths.outputPath.replace(/(\/|\\)src(\/|\\)?$/,"");let p="";if(i.isWatch){const e=(null===(t=null==r?void 0:r.devServer)||void 0===t?void 0:t.port)||3e3;p=(null===(n=null==r?void 0:r.exec)||void 0===n?void 0:n.dev)?r.exec.dev:`light release -wb ${e} ${i.isMpDebug?"--debug":""}`}else p=(null===(o=null==r?void 0:r.exec)||void 0===o?void 0:o.prod)?r.exec.prod:"light release -p";u.exec(`cd ${a} && ${p}`,{async:!0})}}))},exports.generateGmuConf=c;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("path"),t=require("fs-extra"),o=require("shelljs"),n=require("@tarojs/plugin-platform-weapp");function i(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(o){if("default"!==o){var n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:function(){return e[o]}})}})),t.default=e,Object.freeze(t)}var r=i(e),a=i(t),u=i(o);function p(e,t,o,n){return new(o||(o=Promise))((function(i,r){function a(e){try{p(n.next(e))}catch(e){r(e)}}function u(e){try{p(n.throw(e))}catch(e){r(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,u)}p((n=n.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;let s=!1;function c(e,t){if(e&&t)try{const o="gmuConf.js",n=`module.exports = ${JSON.stringify(e)}`;a.writeFileSync(r.join(t,o),n)}catch(e){console.warn(e)}}exports.default=(e,t)=>{let o="gmu";"gmuapp"===e.runOpts.options.platform&&(a.emptyDirSync(e.paths.outputPath),e.initialConfig.outputRoot=r.join(e.initialConfig.outputRoot,"src"),e.paths.outputPath=r.join(e.paths.outputPath,"src"),e.initialConfig.gmuapp&&(o="gmuapp")),e.registerPlatform({name:"gmuapp",useConfigName:o,fn({config:o}){return p(this,void 0,void 0,(function*(){e.modifyBuildAssets((({miniPlugin:t})=>{var o,n,i;const u=[],p=(null===(n=null===(o=t.appConfig)||void 0===o?void 0:o.window)||void 0===n?void 0:n.pullDownRefreshIconPath)||"";p&&u.push(p),t.pages.forEach((e=>{const o=t.filesConfig[t.getConfigFilePath(e.name)].content.pullDownRefreshIconPath;o&&u.push(o)})),u.forEach((t=>{const o=r.join(e.paths.sourcePath,t),n=r.join(e.paths.outputPath,t);a.ensureDirSync(n.slice(0,n.lastIndexOf(r.sep))),a.copyFileSync(o,n)})),c(null===(i=t.appConfig)||void 0===i?void 0:i.gmuConfig,e.paths.outputPath)}));const i=r.join(e.paths.appPath,o.nativePath||"native"),u=r.join(e.paths.outputPath.replace(/(\/|\\)src(\/|\\)?$/,""),"native");a.ensureDir(i),a.copy(i,u),e.generateFrameworkInfo(),e.generateProjectConfig({srcConfigName:"project.gmuapp.json",distConfigName:"../project.json"});const p=new n.Weapp(e,o,t||{});yield p.start()}))}}),e.onBuildFinish((()=>{var t,o,n;const{options:i,config:r}=e.runOpts;if("gmuapp"===i.platform&&!s){s=!0;const a=e.paths.outputPath.replace(/(\/|\\)src(\/|\\)?$/,"");let p="";if(i.isWatch){const e=(null===(t=null==r?void 0:r.devServer)||void 0===t?void 0:t.port)||3e3;p=(null===(o=null==r?void 0:r.exec)||void 0===o?void 0:o.dev)?r.exec.dev:`light release -wb ${e} ${i.isMpDebug?"--debug":""}`}else p=(null===(n=null==r?void 0:r.exec)||void 0===n?void 0:n.prod)?r.exec.prod:"light release -p";u.exec(`cd ${a} && ${p}`,{async:!0})}}))},exports.generateGmuConf=c;
{
"name": "@holajs/plugin-platform-gmuapp",
"version": "0.1.14",
"version": "0.1.15",
"description": "GMU APP平台插件",

@@ -5,0 +5,0 @@ "main": "index.js",