newsee-cli 1.0.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/README.en.md ADDED
@@ -0,0 +1,36 @@
1
+ # newsee-cli
2
+
3
+ #### Description
4
+ 项目初始化
5
+
6
+ #### Software Architecture
7
+ Software architecture description
8
+
9
+ #### Installation
10
+
11
+ 1. xxxx
12
+ 2. xxxx
13
+ 3. xxxx
14
+
15
+ #### Instructions
16
+
17
+ 1. xxxx
18
+ 2. xxxx
19
+ 3. xxxx
20
+
21
+ #### Contribution
22
+
23
+ 1. Fork the repository
24
+ 2. Create Feat_xxx branch
25
+ 3. Commit your code
26
+ 4. Create Pull Request
27
+
28
+
29
+ #### Gitee Feature
30
+
31
+ 1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
32
+ 2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
33
+ 3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
34
+ 4. The most valuable open source project [GVP](https://gitee.com/gvp)
35
+ 5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
36
+ 6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
package/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # zx-cli
2
+
3
+ #### Description
4
+ 项目初始化
5
+
6
+ #### Software Architecture
7
+ Software architecture description
8
+
9
+ #### Installation
10
+
11
+ 1. xxxx
12
+ 2. xxxx
13
+ 3. xxxx
14
+
15
+ #### Instructions
16
+
17
+ 1. xxxx
18
+ 2. xxxx
19
+ 3. xxxx
20
+
21
+ #### Contribution
22
+
23
+ 1. Fork the repository
24
+ 2. Create Feat_xxx branch
25
+ 3. Commit your code
26
+ 4. Create Pull Request
27
+
28
+
29
+ #### Gitee Feature
30
+
31
+ 1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
32
+ 2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
33
+ 3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
34
+ 4. The most valuable open source project [GVP](https://gitee.com/gvp)
35
+ 5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
36
+ 6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
package/bin/init.js ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ (()=>{var e={843:e=>{e.exports={simulateProgressBar:function(e){let t,r=0,o=10;const s=()=>{r<100&&(r+=o,console.log(`Progress: ${r}%`),r>=70&&(o=15),r>=90&&(o=20),t=setTimeout(s,100*o)),e(r)};return t=setTimeout(s,100),()=>{clearTimeout(t),r=100,console.log(`Progress: ${r}%`),e(100)}}}},22:e=>{"use strict";e.exports=require("chalk")},303:e=>{"use strict";e.exports=require("child_process")},295:e=>{"use strict";e.exports=require("cli-progress")},974:e=>{"use strict";e.exports=require("debug")},545:e=>{"use strict";e.exports=require("download-git-repo")},632:e=>{"use strict";e.exports=require("ejs")},116:e=>{"use strict";e.exports=require("figlet")},470:e=>{"use strict";e.exports=require("fs-extra")},290:e=>{"use strict";e.exports=require("inquirer")},591:e=>{"use strict";e.exports=require("ora")},423:e=>{"use strict";e.exports=require("path")},369:e=>{"use strict";e.exports=require("process")}},t={};function r(o){var s=t[o];if(void 0!==s)return s.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,r),i.exports}(()=>{const e=r(591),t=(r(295),r(369)),o=r(116),s=r(290),i=r(545),c=r(632),a=r(470),{exec:n,execSync:u}=r(303),p=r(22);r(423);t.env.DEBUG="download-git-repo";const m=r(974)("download-git-repo");m.enabled=!0;const{simulateProgressBar:l}=r(843);console.log(o.textSync("newsee-cli by nodejs",{font:"Doom",horizontalLayout:"default",verticalLayout:"default"}));const d=e("远端调用模板中-copy...");d.color="yellow";const g=[{name:"pc-template",value:"http://47.96.187.51:3001/zhouxia/micro-pc-template.git"},{name:"wireless-template",value:"http://47.96.187.51:3001/zhouxia/micro-wireless-template.git"}];(async function(){const e=await s.prompt([{type:"input",name:"projectName",message:"请输入项目名称(示例: micro-arm, 输入arm):"},{type:"input",name:"decs",message:"请输入项目描述(示例: 微前端 - 应收中台):"},{type:"list",name:"isAdd",message:"是否创建新的根目录:",choices:[{value:!0},{value:!1}]},{type:"list",name:"template",message:"请选择模板:",choices:g}]),{projectName:r,decs:o,template:n,isAdd:u}=e,l=".temp/micro_"+r;d.start();try{await function(e,t){return new Promise(((r,o)=>{i("direct:"+e,t,{auth:"bab304614ce90ca324d0236579439f71d88416b0",clone:!0,debug:m},(e=>{e?o(e):r()}))}))}(n,l),await async function(e,t,r,o){const s={projectName:e,decs:t},i=["package.json","README.md","config/injection/index.js"];for(const e of i){let t=await c.renderFile(`${r}/${e}.ejs`,s);await a.writeFile(`${r}/${e}`,t),await a.rm(`${r}/${e}.ejs`)}const n=`${r}/config/injection/version/micro_\${projectName}_0.0.1.js`,u=`${r}/config/injection/version/micro_${e}_0.0.1.js`;await a.rename(n,u),o?(a.existsSync(`micro_${e}`)&&await a.remove(`micro_${e}`),await a.mkdir(`micro_${e}`),await a.copy(r,`micro_${e}`)):await a.copy(r,"./")}(r,o,l,u),await a.remove(".temp"),d.succeed("done"),console.log(p.green("模板创建成功")),t.exit(1)}catch(e){await a.remove(".temp"),console.log(p.red("操作失败:",e)),t.exit(1)}})().catch((e=>{console.error(p.red("程序错误:",e)),d.fail("请检查环境"),a.remove(".temp")}))})()})();
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "newsee-cli",
3
+ "version": "1.0.3",
4
+ "description": "新视窗脚手架工具",
5
+ "main": "bin/init.js",
6
+ "bin": {
7
+ "ns-init": "./bin/init.js"
8
+ },
9
+ "scripts": {
10
+ "init": "node bin/init.js",
11
+ "test": "echo \"Error: no test specified\" && exit 1",
12
+ "uglifyjs": "uglifyjs ./src/init.js -o ./bin/init.js -c -m",
13
+ "build": "webpack --mode production"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://gitee.com/zhouxiazxzxzx/zx-cli.git"
18
+ },
19
+ "keywords": [
20
+ "cli",
21
+ "new-see",
22
+ "front",
23
+ "micro"
24
+ ],
25
+ "author": "zhouxia",
26
+ "license": "ISC",
27
+ "dependencies": {
28
+ "cli-progress": "^3.12.0",
29
+ "commander": "^10.0.1",
30
+ "download-git-repo": "^3.0.2",
31
+ "ejs": "^3.1.9",
32
+ "express": "^4.18.2",
33
+ "figlet": "^1.6.0",
34
+ "fs-extra": "^11.1.1",
35
+ "inquirer": "^8.0.0",
36
+ "javascript-obfuscator": "^4.0.2",
37
+ "js-beautify": "^1.14.7",
38
+ "ora": "5.4.1"
39
+ },
40
+ "devDependencies": {
41
+ "uglify-js": "^3.17.4",
42
+ "webpack": "^5.83.1",
43
+ "webpack-cli": "^5.1.1",
44
+ "webpack-obfuscator": "^3.5.1"
45
+ }
46
+ }