aiot-project-templates
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -1,2 +0,2 @@ | ||
(()=>{var e=[(e,t,r)=>{const s=r(1),a=r(2),i=r(3),o={watch:"Vela","tv-h5":"MinaH5","tv-quickapp":"MinaQuickApp",phone:"QuickApp"};let l=i.resolve(__dirname,"./templates");function n(e){let t=i.resolve(l,e),r=i.resolve(t,"./src/manifest.json"),s=i.resolve(t,"./manifest.json"),a=i.resolve(t,"package.json");return new Promise((async(e,o)=>{try{let o={},n=await Promise.allSettled([c(r),c(s)]);for(var l of n)"fulfilled"===l.status&&(o.type=l.value.deviceTypeList[0],o.icon=i.join(l.value.base,l.value.icon));let p=await c(a);p.privateDesc&&(o.detail=p.privateDesc),o.dest=t,e(o)}catch(e){o(e)}}))}function c(e){return new Promise((async(t,r)=>{try{if(a.existsSync(e)){let r=await s.readFile(e);r=JSON.parse(r),r.base=i.resolve(e,".."),t(r)}else r({msg:"文件不存在"})}catch(e){r(e)}}))}"dev"===process.env.NODE_ENV&&(l=i.resolve(__dirname,"../templates")),e.exports=function(){return new Promise((async(e,t)=>{try{let t=await s.readdir(l),a=await(r=t,new Promise((async(e,t)=>{try{let t=[],s={};for(let e of r)t.push(await n(e));for(let e of t){let t=o[e.type];delete e.type;let r=e.detail||"default";delete e.detail,t&&(!s[t]&&(s[t]={}),!s[t][r]&&(s[t][r]=e))}e(s)}catch(e){t(e)}})));e(a)}catch(e){t(e)}var r}))}},e=>{"use strict";e.exports=require("fs/promises")},e=>{"use strict";e.exports=require("fs")},e=>{"use strict";e.exports=require("path")}],t={};var r=function r(s){if(t[s])return t[s].exports;var a=t[s]={exports:{}};return e[s](a,a.exports,r),a.exports}(0);module.exports=r})(); | ||
(()=>{var e=[(e,t,r)=>{const s=r(1),a=r(2),i=r(3),o={watch:"Vela","tv-h5":"MinaH5","tv-quickapp":"MinaQuickApp",phone:"QuickApp"};let n=i.resolve(__dirname,"./templates");function l(e){let t=i.resolve(n,e),r=i.resolve(t,"./src/manifest.json"),s=i.resolve(t,"./manifest.json"),a=i.resolve(t,"package.json");return new Promise((async(e,o)=>{try{let o={},l=await Promise.allSettled([c(r),c(s)]);for(var n of l)"fulfilled"===n.status&&(o.type=n.value.deviceTypeList[0],o.icon=i.join(n.value.base,n.value.icon));let p=await c(a);p.privateDesc&&(o.detail=p.privateDesc),o.dest=t,e(o)}catch(e){o(e)}}))}function c(e){return new Promise((async(t,r)=>{try{if(a.existsSync(e)){let r=await s.readFile(e);r=JSON.parse(r),r.base=i.resolve(e,".."),t(r)}else r({msg:"文件不存在"})}catch(e){r(e)}}))}"dev"===process.env.NODE_ENV&&(n=i.resolve(__dirname,"../templates")),e.exports={getTemplates:function(){return new Promise((async(e,t)=>{try{let t=await s.readdir(n),a=await(r=t,new Promise((async(e,t)=>{try{let t=[],s={};for(let e of r)t.push(await l(e));for(let e of t){let t=o[e.type];delete e.type;let r=e.detail||"default";delete e.detail,t&&(!s[t]&&(s[t]={}),!s[t][r]&&(s[t][r]=e))}e(s)}catch(e){t(e)}})));e(a)}catch(e){t(e)}var r}))},getVersion:function(){return JSON.parse(a.readFileSync(i.resolve(__dirname,"../package.json"))).version}}},e=>{"use strict";e.exports=require("fs/promises")},e=>{"use strict";e.exports=require("fs")},e=>{"use strict";e.exports=require("path")}],t={};var r=function r(s){if(t[s])return t[s].exports;var a=t[s]={exports:{}};return e[s](a,a.exports,r),a.exports}(0);module.exports=r})(); | ||
//# sourceMappingURL=main.js.map |
{ | ||
"name": "aiot-project-templates", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"main": "./dist/main.js", | ||
@@ -11,3 +11,3 @@ "author": "zhaoyinggang", | ||
"dev": "cross-env NODE_ENV=dev nodemon ./src/index.js", | ||
"push": "npm run build && npm publish" | ||
"push": "node ./addOne.js && npm run build && npm publish" | ||
}, | ||
@@ -14,0 +14,0 @@ "keywords": [], |
Sorry, the diff of this file is not supported yet
5542471
26306