@design-edito/cli 0.0.69 → 0.0.71
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/cli/assets/version.txt +1 -1
- package/make-template/assets/express/gitignore +214 -0
- package/make-template/assets/express/package.json +30 -0
- package/make-template/assets/express/src/app.ts +18 -0
- package/make-template/assets/express/src/bin/start.ts +49 -0
- package/make-template/assets/express/src/routes/index.ts +7 -0
- package/make-template/assets/express/src/tsconfig.json +12 -0
- package/make-template/index.js +3 -2
- package/make-template/index.js.map +3 -3
- package/package.json +3 -3
- package/tree/index.js +1 -1
- package/tree/index.js.map +2 -2
package/cli/assets/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.71
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# Created by https://www.toptal.com/developers/gitignore/api/node,osx,linux,windows
|
|
2
|
+
# Edit at https://www.toptal.com/developers/gitignore?templates=node,osx,linux,windows
|
|
3
|
+
|
|
4
|
+
### Linux ###
|
|
5
|
+
*~
|
|
6
|
+
|
|
7
|
+
# temporary files which can be created if a process still has a handle open of a deleted file
|
|
8
|
+
.fuse_hidden*
|
|
9
|
+
|
|
10
|
+
# KDE directory preferences
|
|
11
|
+
.directory
|
|
12
|
+
|
|
13
|
+
# Linux trash folder which might appear on any partition or disk
|
|
14
|
+
.Trash-*
|
|
15
|
+
|
|
16
|
+
# .nfs files are created when an open file is removed but is still being accessed
|
|
17
|
+
.nfs*
|
|
18
|
+
|
|
19
|
+
### Node ###
|
|
20
|
+
# Logs
|
|
21
|
+
logs
|
|
22
|
+
*.log
|
|
23
|
+
npm-debug.log*
|
|
24
|
+
yarn-debug.log*
|
|
25
|
+
yarn-error.log*
|
|
26
|
+
lerna-debug.log*
|
|
27
|
+
.pnpm-debug.log*
|
|
28
|
+
|
|
29
|
+
# Diagnostic reports (https://nodejs.org/api/report.html)
|
|
30
|
+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
|
31
|
+
|
|
32
|
+
# Runtime data
|
|
33
|
+
pids
|
|
34
|
+
*.pid
|
|
35
|
+
*.seed
|
|
36
|
+
*.pid.lock
|
|
37
|
+
|
|
38
|
+
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
39
|
+
lib-cov
|
|
40
|
+
|
|
41
|
+
# Coverage directory used by tools like istanbul
|
|
42
|
+
coverage
|
|
43
|
+
*.lcov
|
|
44
|
+
|
|
45
|
+
# nyc test coverage
|
|
46
|
+
.nyc_output
|
|
47
|
+
|
|
48
|
+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
|
49
|
+
.grunt
|
|
50
|
+
|
|
51
|
+
# Bower dependency directory (https://bower.io/)
|
|
52
|
+
bower_components
|
|
53
|
+
|
|
54
|
+
# node-waf configuration
|
|
55
|
+
.lock-wscript
|
|
56
|
+
|
|
57
|
+
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
58
|
+
build/Release
|
|
59
|
+
|
|
60
|
+
# Dependency directories
|
|
61
|
+
node_modules/
|
|
62
|
+
jspm_packages/
|
|
63
|
+
|
|
64
|
+
# Snowpack dependency directory (https://snowpack.dev/)
|
|
65
|
+
web_modules/
|
|
66
|
+
|
|
67
|
+
# TypeScript cache
|
|
68
|
+
*.tsbuildinfo
|
|
69
|
+
|
|
70
|
+
# Optional npm cache directory
|
|
71
|
+
.npm
|
|
72
|
+
|
|
73
|
+
# Optional eslint cache
|
|
74
|
+
.eslintcache
|
|
75
|
+
|
|
76
|
+
# Optional stylelint cache
|
|
77
|
+
.stylelintcache
|
|
78
|
+
|
|
79
|
+
# Microbundle cache
|
|
80
|
+
.rpt2_cache/
|
|
81
|
+
.rts2_cache_cjs/
|
|
82
|
+
.rts2_cache_es/
|
|
83
|
+
.rts2_cache_umd/
|
|
84
|
+
|
|
85
|
+
# Optional REPL history
|
|
86
|
+
.node_repl_history
|
|
87
|
+
|
|
88
|
+
# Output of 'npm pack'
|
|
89
|
+
*.tgz
|
|
90
|
+
|
|
91
|
+
# Yarn Integrity file
|
|
92
|
+
.yarn-integrity
|
|
93
|
+
|
|
94
|
+
# dotenv environment variable files
|
|
95
|
+
.env
|
|
96
|
+
.env.development.local
|
|
97
|
+
.env.test.local
|
|
98
|
+
.env.production.local
|
|
99
|
+
.env.local
|
|
100
|
+
|
|
101
|
+
# parcel-bundler cache (https://parceljs.org/)
|
|
102
|
+
.cache
|
|
103
|
+
.parcel-cache
|
|
104
|
+
|
|
105
|
+
# Next.js build output
|
|
106
|
+
.next
|
|
107
|
+
out
|
|
108
|
+
|
|
109
|
+
# Nuxt.js build / generate output
|
|
110
|
+
.nuxt
|
|
111
|
+
dist
|
|
112
|
+
|
|
113
|
+
# Gatsby files
|
|
114
|
+
.cache/
|
|
115
|
+
# Comment in the public line in if your project uses Gatsby and not Next.js
|
|
116
|
+
# https://nextjs.org/blog/next-9-1#public-directory-support
|
|
117
|
+
# public
|
|
118
|
+
|
|
119
|
+
# vuepress build output
|
|
120
|
+
.vuepress/dist
|
|
121
|
+
|
|
122
|
+
# vuepress v2.x temp and cache directory
|
|
123
|
+
.temp
|
|
124
|
+
|
|
125
|
+
# Docusaurus cache and generated files
|
|
126
|
+
.docusaurus
|
|
127
|
+
|
|
128
|
+
# Serverless directories
|
|
129
|
+
.serverless/
|
|
130
|
+
|
|
131
|
+
# FuseBox cache
|
|
132
|
+
.fusebox/
|
|
133
|
+
|
|
134
|
+
# DynamoDB Local files
|
|
135
|
+
.dynamodb/
|
|
136
|
+
|
|
137
|
+
# TernJS port file
|
|
138
|
+
.tern-port
|
|
139
|
+
|
|
140
|
+
# Stores VSCode versions used for testing VSCode extensions
|
|
141
|
+
.vscode-test
|
|
142
|
+
|
|
143
|
+
# yarn v2
|
|
144
|
+
.yarn/cache
|
|
145
|
+
.yarn/unplugged
|
|
146
|
+
.yarn/build-state.yml
|
|
147
|
+
.yarn/install-state.gz
|
|
148
|
+
.pnp.*
|
|
149
|
+
|
|
150
|
+
### Node Patch ###
|
|
151
|
+
# Serverless Webpack directories
|
|
152
|
+
.webpack/
|
|
153
|
+
|
|
154
|
+
# Optional stylelint cache
|
|
155
|
+
|
|
156
|
+
# SvelteKit build / generate output
|
|
157
|
+
.svelte-kit
|
|
158
|
+
|
|
159
|
+
### OSX ###
|
|
160
|
+
# General
|
|
161
|
+
.DS_Store
|
|
162
|
+
.AppleDouble
|
|
163
|
+
.LSOverride
|
|
164
|
+
|
|
165
|
+
# Icon must end with two \r
|
|
166
|
+
Icon
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
# Thumbnails
|
|
170
|
+
._*
|
|
171
|
+
|
|
172
|
+
# Files that might appear in the root of a volume
|
|
173
|
+
.DocumentRevisions-V100
|
|
174
|
+
.fseventsd
|
|
175
|
+
.Spotlight-V100
|
|
176
|
+
.TemporaryItems
|
|
177
|
+
.Trashes
|
|
178
|
+
.VolumeIcon.icns
|
|
179
|
+
.com.apple.timemachine.donotpresent
|
|
180
|
+
|
|
181
|
+
# Directories potentially created on remote AFP share
|
|
182
|
+
.AppleDB
|
|
183
|
+
.AppleDesktop
|
|
184
|
+
Network Trash Folder
|
|
185
|
+
Temporary Items
|
|
186
|
+
.apdisk
|
|
187
|
+
|
|
188
|
+
### Windows ###
|
|
189
|
+
# Windows thumbnail cache files
|
|
190
|
+
Thumbs.db
|
|
191
|
+
Thumbs.db:encryptable
|
|
192
|
+
ehthumbs.db
|
|
193
|
+
ehthumbs_vista.db
|
|
194
|
+
|
|
195
|
+
# Dump file
|
|
196
|
+
*.stackdump
|
|
197
|
+
|
|
198
|
+
# Folder config file
|
|
199
|
+
[Dd]esktop.ini
|
|
200
|
+
|
|
201
|
+
# Recycle Bin used on file shares
|
|
202
|
+
$RECYCLE.BIN/
|
|
203
|
+
|
|
204
|
+
# Windows Installer files
|
|
205
|
+
*.cab
|
|
206
|
+
*.msi
|
|
207
|
+
*.msix
|
|
208
|
+
*.msm
|
|
209
|
+
*.msp
|
|
210
|
+
|
|
211
|
+
# Windows shortcuts
|
|
212
|
+
*.lnk
|
|
213
|
+
|
|
214
|
+
# End of https://www.toptal.com/developers/gitignore/api/node,osx,linux,windows
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "-",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build:src": "npx esbuild --bundle src/bin/start.ts --outdir=dist --sourcemap --platform=node --format=esm --external:debug --external:express --external:cookie-parser --external:morgan",
|
|
8
|
+
"watch:src": "npm run build:src && npx chokidar 'src/**/*' -c 'npm run build:src'",
|
|
9
|
+
"serve": "npx nodemon ./dist/start.js",
|
|
10
|
+
"start:nowatch": "npm run build:src && npm run serve",
|
|
11
|
+
"start": "npx concurrently -n 'watch:src ,serve ' 'npm run watch:src' 'npm run serve'"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"cookie-parser": "~1.4.4",
|
|
15
|
+
"debug": "~2.6.9",
|
|
16
|
+
"express": "^4.19.2",
|
|
17
|
+
"morgan": "~1.9.1"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@types/cookie-parser": "^1.4.7",
|
|
21
|
+
"@types/debug": "^4.1.12",
|
|
22
|
+
"@types/express": "^4.17.21",
|
|
23
|
+
"@types/morgan": "^1.9.9",
|
|
24
|
+
"@types/node": "^22.2.0",
|
|
25
|
+
"chokidar-cli": "^3.0.0",
|
|
26
|
+
"concurrently": "^8.2.2",
|
|
27
|
+
"esbuild": "^0.23.0",
|
|
28
|
+
"typescript": "^5.5.4"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import path from 'node:path'
|
|
2
|
+
import { fileURLToPath } from 'node:url'
|
|
3
|
+
import express from 'express'
|
|
4
|
+
import cookieParser from 'cookie-parser'
|
|
5
|
+
import logger from 'morgan'
|
|
6
|
+
import indexRouter from './routes/index.js'
|
|
7
|
+
|
|
8
|
+
const app = express()
|
|
9
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
10
|
+
|
|
11
|
+
app.use(logger('dev'))
|
|
12
|
+
app.use(express.json())
|
|
13
|
+
app.use(express.urlencoded({ extended: false }))
|
|
14
|
+
app.use(cookieParser())
|
|
15
|
+
app.use(express.static(path.join(__dirname, 'public')))
|
|
16
|
+
app.use('/', indexRouter)
|
|
17
|
+
|
|
18
|
+
export default app
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import http from 'node:http'
|
|
2
|
+
import debugModule from 'debug'
|
|
3
|
+
import app from '../app.js'
|
|
4
|
+
|
|
5
|
+
const debug = debugModule('<<@mxfb/cli----replace-with-name>>:server')
|
|
6
|
+
const port = normalizePort(process.env.PORT ?? '3000')
|
|
7
|
+
|
|
8
|
+
app.set('port', port)
|
|
9
|
+
|
|
10
|
+
const server = http.createServer(app)
|
|
11
|
+
|
|
12
|
+
server.listen(port)
|
|
13
|
+
server.on('error', onError)
|
|
14
|
+
server.on('listening', onListening)
|
|
15
|
+
|
|
16
|
+
function normalizePort (val: string) {
|
|
17
|
+
var port = parseInt(val, 10)
|
|
18
|
+
if (isNaN(port)) return val
|
|
19
|
+
if (port >= 0) return port
|
|
20
|
+
return false
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface NodeError extends Error {
|
|
24
|
+
syscall?: string
|
|
25
|
+
code?: string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function onError (error: NodeError) {
|
|
29
|
+
if (error.syscall !== 'listen') throw error
|
|
30
|
+
var bind = typeof port === 'string' ? 'Pipe ' + port : 'Port ' + port
|
|
31
|
+
switch (error.code) {
|
|
32
|
+
case 'EACCES':
|
|
33
|
+
console.error(bind + ' requires elevated privileges')
|
|
34
|
+
process.exit(1)
|
|
35
|
+
break
|
|
36
|
+
case 'EADDRINUSE':
|
|
37
|
+
console.error(bind + ' is already in use')
|
|
38
|
+
process.exit(1)
|
|
39
|
+
break
|
|
40
|
+
default:
|
|
41
|
+
throw error
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function onListening () {
|
|
46
|
+
var addr = server.address()
|
|
47
|
+
var bind = typeof addr === 'string' ? 'pipe ' + addr : 'port ' + (addr?.port ?? '')
|
|
48
|
+
debug('Listening on ' + bind)
|
|
49
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"forceConsistentCasingInFileNames": true,
|
|
8
|
+
"strict": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"noUncheckedIndexedAccess": true
|
|
11
|
+
}
|
|
12
|
+
}
|
package/make-template/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
3
|
-
`},{encoding:"utf-8"});let
|
|
2
|
+
import l from"node:process";import{promises as i,existsSync as j}from"node:fs";import x from"node:url";import t from"node:path";import{spawn as w}from"node:child_process";import{program as d}from"commander";import y from"prompts";import{Files as f}from"@design-edito/tools/node/files/index.js";var k=x.fileURLToPath(import.meta.url),h=t.dirname(k),p=l.cwd();d.name("@design-edito/make-template").description("Generate in cwd a project template");d.command("express").description("make express.js + typescript project structure").action(N);d.command("html").description("make simple html project structure").action(S);d.command("react").description("make react + typescript project structure").action(b);d.parse(l.argv);async function S(){let o=t.join(h,"assets/html");if(!j(o))return console.error(`Could not find the template to copy at ${o}`),l.exit(1);let n=t.join(p,"html-template");await i.cp(o,n,{recursive:!0})}async function b(){let o=t.join(h,"assets/react");if(!j(o))return console.error(`Could not find the template to copy at ${o}`),l.exit(1);let n=t.join(p,"react-template");await i.cp(o,n,{recursive:!0});let{projectName:s}=await y({name:"projectName",message:"Project name ? (for package.json name field)",type:"text"}),u=t.join(n,"package.json");await f.readWrite(u,r=>{let e=typeof r=="string"?r:r.toString(),a=JSON.parse(e);delete a.name;let m={name:s,...a};return`${JSON.stringify(m,null,2)}
|
|
3
|
+
`},{encoding:"utf-8"});let g=w(`cd ${n} && npm i`,{stdio:"inherit",shell:!0});await new Promise((r,e)=>{g.on("exit",()=>r(!0)),g.on("error",()=>e(!1))});let c=t.join(p,s);await i.rename(n,c),await i.rename(t.join(c,"gitignore"),t.join(c,".gitignore"))}async function N(){let o=t.join(h,"assets/express");if(!j(o))return console.error(`Could not find the template to copy at ${o}`),l.exit(1);let n=t.join(p,"express-template");await i.cp(o,n,{recursive:!0});let{projectName:s}=await y({name:"projectName",message:"Project name ? (for package.json name field)",type:"text"}),u=t.join(n,"package.json");await f.readWrite(u,e=>{let a=typeof e=="string"?e:e.toString(),m=JSON.parse(a);delete m.name;let P={name:s,...m};return`${JSON.stringify(P,null,2)}
|
|
4
|
+
`},{encoding:"utf-8"});let g=t.join(n,"src/bin/start.ts");await f.readWrite(g,e=>(typeof e=="string"?e:e.toString()).replace("<<@mxfb/cli----replace-with-name>>",s),{encoding:"utf-8"});let c=w(`cd ${n} && npm i`,{stdio:"inherit",shell:!0});await new Promise((e,a)=>{c.on("exit",()=>e(!0)),c.on("error",()=>a(!1))});let r=t.join(p,s);await i.rename(n,r),await i.rename(t.join(r,"gitignore"),t.join(r,".gitignore"))}
|
|
4
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/make-template/index.ts"],
|
|
4
|
-
"sourcesContent": ["import process from 'node:process'\nimport { promises as fs, existsSync } from 'node:fs'\nimport url from 'node:url'\nimport path from 'node:path'\nimport { spawn } from 'node:child_process'\nimport { program } from 'commander'\nimport prompts from 'prompts'\nimport { Files } from '@design-edito/tools/node/files'\n\nconst __filename = url.fileURLToPath(import.meta.url)\nconst __dirname = path.dirname(__filename)\nconst CWD = process.cwd()\n\nprogram\n .name('@design-edito/make-template')\n .description('Generate in cwd a project template')\n \nprogram\n .command('html')\n .description('make simple html project structure')\n .action(makeHtml)\n\nprogram\n .command('react')\n .description('make react + typescript project structure')\n .action(makeReact)\n\nprogram.parse(process.argv)\n\nasync function makeHtml () {\n const htmlTemplatePath = path.join(__dirname, 'assets/html')\n if (!existsSync(htmlTemplatePath)) {\n console.error(`Could not find the template to copy at ${htmlTemplatePath}`)\n return process.exit(1)\n }\n const targetPath = path.join(CWD, 'html-template')\n await fs.cp(htmlTemplatePath, targetPath, { recursive: true })\n}\n\nasync function makeReact () {\n const
|
|
5
|
-
"mappings": "AAAA,OAAOA,MAAa,eACpB,OAAS,YAAYC,EAAI,cAAAC,MAAkB,UAC3C,OAAOC,MAAS,WAChB,OAAOC,MAAU,YACjB,OAAS,SAAAC,MAAa,qBACtB,OAAS,WAAAC,MAAe,YACxB,OAAOC,MAAa,UACpB,OAAS,SAAAC,MAAa,
|
|
6
|
-
"names": ["process", "fs", "existsSync", "url", "path", "spawn", "program", "prompts", "Files", "__filename", "__dirname", "CWD", "makeHtml", "makeReact", "htmlTemplatePath", "targetPath", "defaultTargetPath", "projectName", "packageJsonPath", "rawContent", "content", "contentObj", "newContentObj", "npmISubprocess", "resolve", "reject"]
|
|
4
|
+
"sourcesContent": ["import process from 'node:process'\nimport { promises as fs, existsSync } from 'node:fs'\nimport url from 'node:url'\nimport path from 'node:path'\nimport { spawn } from 'node:child_process'\nimport { program } from 'commander'\nimport prompts from 'prompts'\nimport { Files } from '@design-edito/tools/node/files/index.js'\n\nconst __filename = url.fileURLToPath(import.meta.url)\nconst __dirname = path.dirname(__filename)\nconst CWD = process.cwd()\n\nprogram\n .name('@design-edito/make-template')\n .description('Generate in cwd a project template')\n\nprogram\n .command('express')\n .description('make express.js + typescript project structure')\n .action(makeExpress)\n \nprogram\n .command('html')\n .description('make simple html project structure')\n .action(makeHtml)\n\nprogram\n .command('react')\n .description('make react + typescript project structure')\n .action(makeReact)\n\nprogram.parse(process.argv)\n\nasync function makeHtml () {\n const htmlTemplatePath = path.join(__dirname, 'assets/html')\n if (!existsSync(htmlTemplatePath)) {\n console.error(`Could not find the template to copy at ${htmlTemplatePath}`)\n return process.exit(1)\n }\n const targetPath = path.join(CWD, 'html-template')\n await fs.cp(htmlTemplatePath, targetPath, { recursive: true })\n}\n\nasync function makeReact () {\n const reactTemplatePath = path.join(__dirname, 'assets/react')\n if (!existsSync(reactTemplatePath)) {\n console.error(`Could not find the template to copy at ${reactTemplatePath}`)\n return process.exit(1)\n }\n const defaultTargetPath = path.join(CWD, 'react-template')\n \n // Copy\n await fs.cp(reactTemplatePath, defaultTargetPath, { recursive: true })\n const { projectName } = await prompts({\n name: 'projectName',\n message: 'Project name ? (for package.json name field)',\n type: 'text'\n })\n \n // Custom project name\n const packageJsonPath = path.join(defaultTargetPath, 'package.json')\n await Files.readWrite(packageJsonPath, rawContent => {\n const content = typeof rawContent === 'string'\n ? rawContent\n : rawContent.toString()\n const contentObj = JSON.parse(content) as Record<string, string>\n delete contentObj.name\n const newContentObj = {\n name: projectName,\n ...contentObj\n }\n return `${JSON.stringify(newContentObj, null, 2)}\\n`\n }, { encoding: 'utf-8' })\n \n // Install deps\n const npmISubprocess = spawn(`cd ${defaultTargetPath} && npm i`, { stdio: 'inherit', shell: true })\n await new Promise((resolve, reject) => {\n npmISubprocess.on('exit', () => resolve(true))\n npmISubprocess.on('error', () => reject(false))\n })\n\n // Rename project\n const targetPath = path.join(CWD, projectName)\n await fs.rename(defaultTargetPath, targetPath)\n\n // Rename gitignore\n await fs.rename(\n path.join(targetPath, 'gitignore'),\n path.join(targetPath, '.gitignore')\n )\n}\n\nasync function makeExpress () {\n const expressTemplatePath = path.join(__dirname, 'assets/express')\n if (!existsSync(expressTemplatePath)) {\n console.error(`Could not find the template to copy at ${expressTemplatePath}`)\n return process.exit(1)\n }\n const defaultTargetPath = path.join(CWD, 'express-template')\n \n // Copy\n await fs.cp(expressTemplatePath, defaultTargetPath, { recursive: true })\n const { projectName } = await prompts({\n name: 'projectName',\n message: 'Project name ? (for package.json name field)',\n type: 'text'\n })\n \n // Custom project name in package.json\n const packageJsonPath = path.join(defaultTargetPath, 'package.json')\n await Files.readWrite(packageJsonPath, rawContent => {\n const content = typeof rawContent === 'string'\n ? rawContent\n : rawContent.toString()\n const contentObj = JSON.parse(content) as Record<string, string>\n delete contentObj.name\n const newContentObj = {\n name: projectName,\n ...contentObj\n }\n return `${JSON.stringify(newContentObj, null, 2)}\\n`\n }, { encoding: 'utf-8' })\n\n // Custom project name in src/bin/start.ts\n const binStartTsPath = path.join(defaultTargetPath, 'src/bin/start.ts')\n await Files.readWrite(binStartTsPath, rawContent => {\n const originalContent = typeof rawContent === 'string'\n ? rawContent\n : rawContent.toString()\n const updatedContent = originalContent.replace('<<@mxfb/cli----replace-with-name>>', projectName)\n return updatedContent\n }, { encoding: 'utf-8' })\n \n // Install deps\n const npmISubprocess = spawn(`cd ${defaultTargetPath} && npm i`, { stdio: 'inherit', shell: true })\n await new Promise((resolve, reject) => {\n npmISubprocess.on('exit', () => resolve(true))\n npmISubprocess.on('error', () => reject(false))\n })\n\n // Rename project\n const targetPath = path.join(CWD, projectName)\n await fs.rename(defaultTargetPath, targetPath)\n\n // Rename gitignore\n await fs.rename(\n path.join(targetPath, 'gitignore'),\n path.join(targetPath, '.gitignore')\n )\n}\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAAa,eACpB,OAAS,YAAYC,EAAI,cAAAC,MAAkB,UAC3C,OAAOC,MAAS,WAChB,OAAOC,MAAU,YACjB,OAAS,SAAAC,MAAa,qBACtB,OAAS,WAAAC,MAAe,YACxB,OAAOC,MAAa,UACpB,OAAS,SAAAC,MAAa,0CAEtB,IAAMC,EAAaN,EAAI,cAAc,YAAY,GAAG,EAC9CO,EAAYN,EAAK,QAAQK,CAAU,EACnCE,EAAMX,EAAQ,IAAI,EAExBM,EACG,KAAK,6BAA6B,E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AiBzB,EAAK,KAAKc,EAAmB,kBAAkB,EACtE,MAAMV,EAAM,UAAUqB,EAAgBR,IACZ,OAAOA,GAAe,SAC1CA,EACAA,EAAW,SAAS,GACe,QAAQ,qCAAsCF,CAAW,EAE/F,CAAE,SAAU,OAAQ,CAAC,EAGxB,IAAMM,EAAiBpB,EAAM,MAAMa,CAAiB,YAAa,CAAE,MAAO,UAAW,MAAO,EAAK,CAAC,EAClG,MAAM,IAAI,QAAQ,CAACQ,EAASC,IAAW,CACrCF,EAAe,GAAG,OAAQ,IAAMC,EAAQ,EAAI,CAAC,EAC7CD,EAAe,GAAG,QAAS,IAAME,EAAO,EAAK,CAAC,CAChD,CAAC,EAGD,IAAMX,EAAaZ,EAAK,KAAKO,EAAKQ,CAAW,EAC7C,MAAMlB,EAAG,OAAOiB,EAAmBF,CAAU,EAG7C,MAAMf,EAAG,OACPG,EAAK,KAAKY,EAAY,WAAW,EACjCZ,EAAK,KAAKY,EAAY,YAAY,CACpC,CACF",
|
|
6
|
+
"names": ["process", "fs", "existsSync", "url", "path", "spawn", "program", "prompts", "Files", "__filename", "__dirname", "CWD", "makeExpress", "makeHtml", "makeReact", "htmlTemplatePath", "targetPath", "reactTemplatePath", "defaultTargetPath", "projectName", "packageJsonPath", "rawContent", "content", "contentObj", "newContentObj", "npmISubprocess", "resolve", "reject", "expressTemplatePath", "binStartTsPath"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@design-edito/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.71",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Maxime Fabas",
|
|
6
6
|
"license": "ISC",
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
"main": "index.js",
|
|
13
13
|
"module": "index.js",
|
|
14
14
|
"bin": {
|
|
15
|
-
"make-template": "./make-template/index.js",
|
|
16
15
|
"cli": "./cli/index.js",
|
|
16
|
+
"make-template": "./make-template/index.js",
|
|
17
17
|
"tree": "./tree/index.js"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@design-edito/tools": "^0.1.
|
|
20
|
+
"@design-edito/tools": "^0.1.7",
|
|
21
21
|
"commander": "^12.1.0",
|
|
22
22
|
"prompts": "^2.4.2"
|
|
23
23
|
},
|
package/tree/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{program as b}from"commander";import{isInDirectory as f}from"@design-edito/tools/node/files/is-in-directory";import{Subpaths as w}from"@design-edito/tools/node/files/subpaths";var h=process.cwd();b.name("@design-edito/tree").description("List subpaths from the current working directory").argument("[depth]","Depth (optional, defaults to 0)").option("-f, --files [bool]","Include files",i,!0).option("-H, --hidden [bool]","Include hidden files",i,!0).option("-d, --directories [bool]","Include directories",i,!0).option("-s, --symlinks [bool]","Include symlinks",i,!0).option("-F, --follow [bool]","Follow symlinks",i,!1).option("-u, --unique [bool]","Ensures followed symlinks contents don't create duplicates",i,!1).option("-e, --exclude [pattern]","Regexp patterns to exclude from the result").option("-i, --include [pattern]","Regexp patterns to include in the result").action(async(n,e)=>{let r=n!==void 0?parseInt(n):0;if(Number.isNaN(r))return console.error("Depth should be a number"),process.exit(1);let s=(await w.list(h,{maxDepth:r,files:e.files,hidden:e.hidden,directories:e.directories,symlinks:e.symlinks,followSimlinks:e.follow,dedupeSimlinksContents:e.unique,exclude:m(e.exclude),include:m(e.include),returnRelative:!0})).reduce((u,l)=>{let a=y(l),c={value:l,level:a,children:[]};u.filter(t=>t.level===a-1&&f(l,t.value)).forEach(t=>t.children.push(c));let p=u.filter(t=>t.level===a+1&&f(t.value,l));return c.children.push(...p),[...u,c]},[]);console.log(h),g(s)});b.parse(process.argv);function i(n){let e=`${n}`.trim().toLowerCase();if(e==="true")return!0;if(e==="false")return!1}function m(n){if(typeof n!="string")return;let e=/^\/(.+)\/([a-z]*)$/,r=n.match(e);if(r===null)return;let[,o,s]=r;return new RegExp(o,s)}function y(n){return n.split("/").length-1}function g(n,e=0,r=[]){n.filter(o=>o.level===e).forEach((o,s,u)=>{let l=s===u.length-1,a=l?"\u2514\u2500\u2500":"\u251C\u2500\u2500",{value:c,level:d,children:p}=o,t=c.split("/").slice(d).join("/"),v=new Array(d).fill(null).map((x,k)=>r[k]===!0?" ":"\u2502 ").join("");console.log(`${v}${a} ${t}`),g(p,d+1,[...r,l])})}
|
|
2
|
+
import{program as b}from"commander";import{isInDirectory as f}from"@design-edito/tools/node/files/is-in-directory/index.js";import{Subpaths as w}from"@design-edito/tools/node/files/subpaths/index.js";var h=process.cwd();b.name("@design-edito/tree").description("List subpaths from the current working directory").argument("[depth]","Depth (optional, defaults to 0)").option("-f, --files [bool]","Include files",i,!0).option("-H, --hidden [bool]","Include hidden files",i,!0).option("-d, --directories [bool]","Include directories",i,!0).option("-s, --symlinks [bool]","Include symlinks",i,!0).option("-F, --follow [bool]","Follow symlinks",i,!1).option("-u, --unique [bool]","Ensures followed symlinks contents don't create duplicates",i,!1).option("-e, --exclude [pattern]","Regexp patterns to exclude from the result").option("-i, --include [pattern]","Regexp patterns to include in the result").action(async(n,e)=>{let r=n!==void 0?parseInt(n):0;if(Number.isNaN(r))return console.error("Depth should be a number"),process.exit(1);let s=(await w.list(h,{maxDepth:r,files:e.files,hidden:e.hidden,directories:e.directories,symlinks:e.symlinks,followSimlinks:e.follow,dedupeSimlinksContents:e.unique,exclude:m(e.exclude),include:m(e.include),returnRelative:!0})).reduce((u,l)=>{let a=y(l),c={value:l,level:a,children:[]};u.filter(t=>t.level===a-1&&f(l,t.value)).forEach(t=>t.children.push(c));let p=u.filter(t=>t.level===a+1&&f(t.value,l));return c.children.push(...p),[...u,c]},[]);console.log(h),g(s)});b.parse(process.argv);function i(n){let e=`${n}`.trim().toLowerCase();if(e==="true")return!0;if(e==="false")return!1}function m(n){if(typeof n!="string")return;let e=/^\/(.+)\/([a-z]*)$/,r=n.match(e);if(r===null)return;let[,o,s]=r;return new RegExp(o,s)}function y(n){return n.split("/").length-1}function g(n,e=0,r=[]){n.filter(o=>o.level===e).forEach((o,s,u)=>{let l=s===u.length-1,a=l?"\u2514\u2500\u2500":"\u251C\u2500\u2500",{value:c,level:d,children:p}=o,t=c.split("/").slice(d).join("/"),v=new Array(d).fill(null).map((x,k)=>r[k]===!0?" ":"\u2502 ").join("");console.log(`${v}${a} ${t}`),g(p,d+1,[...r,l])})}
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/tree/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/tree/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { program } from 'commander'\nimport { isInDirectory } from '@design-edito/tools/node/files/is-in-directory'\nimport { Subpaths } from '@design-edito/tools/node/files/subpaths'\n\nconst CWD = process.cwd()\n\ntype SubpathData = {\n value: string\n level: number\n children: SubpathData[]\n}\n\nprogram\n .name('@design-edito/tree')\n .description('List subpaths from the current working directory')\n .argument('[depth]', 'Depth (optional, defaults to 0)')\n .option('-f, --files [bool]', 'Include files', parseBoolean, true)\n .option('-H, --hidden [bool]', 'Include hidden files', parseBoolean, true)\n .option('-d, --directories [bool]', 'Include directories', parseBoolean, true)\n .option('-s, --symlinks [bool]', 'Include symlinks', parseBoolean, true)\n .option('-F, --follow [bool]', 'Follow symlinks', parseBoolean, false)\n .option('-u, --unique [bool]', 'Ensures followed symlinks contents don\\'t create duplicates', parseBoolean, false)\n .option('-e, --exclude [pattern]', 'Regexp patterns to exclude from the result')\n .option('-i, --include [pattern]', 'Regexp patterns to include in the result')\n .action(async (_depth, options) => {\n const depth = _depth !== undefined ? parseInt(_depth) : 0\n if (Number.isNaN(depth)) {\n console.error('Depth should be a number')\n return process.exit(1)\n }\n const subpaths = await Subpaths.list(CWD, {\n maxDepth: depth,\n files: options.files,\n hidden: options.hidden,\n directories: options.directories,\n symlinks: options.symlinks,\n followSimlinks: options.follow,\n dedupeSimlinksContents: options.unique,\n exclude: makeRegexp(options.exclude),\n include: makeRegexp(options.include),\n returnRelative: true\n })\n const subpathsData = subpaths.reduce<SubpathData[]>((reduced, subpath) => {\n const level = getLevel(subpath)\n const thisSubpathData = {\n value: subpath,\n level,\n children: [] as SubpathData[]\n }\n // Parents\n const parents = reduced.filter(subpathData => subpathData.level === level - 1 && isInDirectory(subpath, subpathData.value))\n parents.forEach(parent => parent.children.push(thisSubpathData))\n // Children\n const children = reduced.filter(subpathData => subpathData.level === level + 1 && isInDirectory(subpathData.value, subpath))\n thisSubpathData.children.push(...children)\n return [...reduced, thisSubpathData]\n }, [])\n console.log(CWD)\n printSubpathData(subpathsData)\n })\n\nprogram.parse(process.argv)\n\nfunction parseBoolean (val: unknown) {\n const strVal = `${val}`.trim().toLowerCase()\n if (strVal === 'true') return true\n if (strVal === 'false') return false\n return undefined\n}\n\nfunction makeRegexp (strRegexp: unknown) {\n if (typeof strRegexp !== 'string') return undefined\n const validRegexpRegexp = /^\\/(.+)\\/([a-z]*)$/\n const inputMatches = strRegexp.match(validRegexpRegexp)\n if (inputMatches === null) return undefined\n const [, pattern, flags] = inputMatches\n return new RegExp(pattern!, flags!)\n}\n\nfunction getLevel (path: string) {\n const chunks = path.split('/')\n return chunks.length - 1\n}\n\nfunction printSubpathData (\n subpathsData: SubpathData[],\n level: number = 0,\n parentsAreLastMap: boolean[] = []) {\n subpathsData\n .filter(subpathData => subpathData.level === level)\n .forEach((subpathsData, pos, filtered) => {\n const isLast = pos === filtered.length - 1\n const indentChar = isLast ? '\u2514\u2500\u2500' : '\u251C\u2500\u2500'\n const { value, level, children } = subpathsData\n const toPrint = value.split('/').slice(level).join('/')\n const indentChars = new Array(level).fill(null).map((e, pos) => {\n if (parentsAreLastMap[pos] === true) return ' '\n else return '\u2502 '\n }).join('')\n console.log(`${indentChars}${indentChar} ${toPrint}`)\n printSubpathData(children, level + 1, [...parentsAreLastMap, isLast])\n })\n}\n"],
|
|
5
|
-
"mappings": "AAAA,OAAS,WAAAA,MAAe,YACxB,OAAS,iBAAAC,MAAqB,
|
|
4
|
+
"sourcesContent": ["import { program } from 'commander'\nimport { isInDirectory } from '@design-edito/tools/node/files/is-in-directory/index.js'\nimport { Subpaths } from '@design-edito/tools/node/files/subpaths/index.js'\n\nconst CWD = process.cwd()\n\ntype SubpathData = {\n value: string\n level: number\n children: SubpathData[]\n}\n\nprogram\n .name('@design-edito/tree')\n .description('List subpaths from the current working directory')\n .argument('[depth]', 'Depth (optional, defaults to 0)')\n .option('-f, --files [bool]', 'Include files', parseBoolean, true)\n .option('-H, --hidden [bool]', 'Include hidden files', parseBoolean, true)\n .option('-d, --directories [bool]', 'Include directories', parseBoolean, true)\n .option('-s, --symlinks [bool]', 'Include symlinks', parseBoolean, true)\n .option('-F, --follow [bool]', 'Follow symlinks', parseBoolean, false)\n .option('-u, --unique [bool]', 'Ensures followed symlinks contents don\\'t create duplicates', parseBoolean, false)\n .option('-e, --exclude [pattern]', 'Regexp patterns to exclude from the result')\n .option('-i, --include [pattern]', 'Regexp patterns to include in the result')\n .action(async (_depth, options) => {\n const depth = _depth !== undefined ? parseInt(_depth) : 0\n if (Number.isNaN(depth)) {\n console.error('Depth should be a number')\n return process.exit(1)\n }\n const subpaths = await Subpaths.list(CWD, {\n maxDepth: depth,\n files: options.files,\n hidden: options.hidden,\n directories: options.directories,\n symlinks: options.symlinks,\n followSimlinks: options.follow,\n dedupeSimlinksContents: options.unique,\n exclude: makeRegexp(options.exclude),\n include: makeRegexp(options.include),\n returnRelative: true\n })\n const subpathsData = subpaths.reduce<SubpathData[]>((reduced, subpath) => {\n const level = getLevel(subpath)\n const thisSubpathData = {\n value: subpath,\n level,\n children: [] as SubpathData[]\n }\n // Parents\n const parents = reduced.filter(subpathData => subpathData.level === level - 1 && isInDirectory(subpath, subpathData.value))\n parents.forEach(parent => parent.children.push(thisSubpathData))\n // Children\n const children = reduced.filter(subpathData => subpathData.level === level + 1 && isInDirectory(subpathData.value, subpath))\n thisSubpathData.children.push(...children)\n return [...reduced, thisSubpathData]\n }, [])\n console.log(CWD)\n printSubpathData(subpathsData)\n })\n\nprogram.parse(process.argv)\n\nfunction parseBoolean (val: unknown) {\n const strVal = `${val}`.trim().toLowerCase()\n if (strVal === 'true') return true\n if (strVal === 'false') return false\n return undefined\n}\n\nfunction makeRegexp (strRegexp: unknown) {\n if (typeof strRegexp !== 'string') return undefined\n const validRegexpRegexp = /^\\/(.+)\\/([a-z]*)$/\n const inputMatches = strRegexp.match(validRegexpRegexp)\n if (inputMatches === null) return undefined\n const [, pattern, flags] = inputMatches\n return new RegExp(pattern!, flags!)\n}\n\nfunction getLevel (path: string) {\n const chunks = path.split('/')\n return chunks.length - 1\n}\n\nfunction printSubpathData (\n subpathsData: SubpathData[],\n level: number = 0,\n parentsAreLastMap: boolean[] = []) {\n subpathsData\n .filter(subpathData => subpathData.level === level)\n .forEach((subpathsData, pos, filtered) => {\n const isLast = pos === filtered.length - 1\n const indentChar = isLast ? '\u2514\u2500\u2500' : '\u251C\u2500\u2500'\n const { value, level, children } = subpathsData\n const toPrint = value.split('/').slice(level).join('/')\n const indentChars = new Array(level).fill(null).map((e, pos) => {\n if (parentsAreLastMap[pos] === true) return ' '\n else return '\u2502 '\n }).join('')\n console.log(`${indentChars}${indentChar} ${toPrint}`)\n printSubpathData(children, level + 1, [...parentsAreLastMap, isLast])\n })\n}\n"],
|
|
5
|
+
"mappings": "AAAA,OAAS,WAAAA,MAAe,YACxB,OAAS,iBAAAC,MAAqB,0DAC9B,OAAS,YAAAC,MAAgB,mDAEzB,IAAMC,EAAM,QAAQ,IAAI,EAQxBH,EACG,KAAK,oBAAoB,EACzB,YAAY,kDAAkD,EAC9D,SAAS,UAAW,iCAAiC,EACrD,OAAO,qBAAsB,gBAAiBI,EAAc,EAAI,EAChE,OAAO,sBAAuB,uBAAwBA,EAAc,EAAI,EACxE,OAAO,2BAA4B,sBAAuBA,EAAc,EAAI,EAC5E,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,GAAGD,CAAG,GAAG,KAAK,EAAE,YAAY,EAC3C,GAAIC,IAAW,OAAQ,MAAO,GAC9B,GAAIA,IAAW,QAAS,MAAO,EAEjC,CAEA,SAASX,EAAYY,EAAoB,CACvC,GAAI,OAAOA,GAAc,SAAU,OACnC,IAAMC,EAAoB,qBACpBC,EAAeF,EAAU,MAAMC,CAAiB,EACtD,GAAIC,IAAiB,KAAM,OAC3B,GAAM,CAAC,CAAEC,EAASC,CAAK,EAAIF,EAC3B,OAAO,IAAI,OAAOC,EAAUC,CAAM,CACpC,CAEA,SAASZ,EAAUa,EAAc,CAE/B,OADeA,EAAK,MAAM,GAAG,EACf,OAAS,CACzB,CAEA,SAASR,EACPV,EACAI,EAAgB,EAChBe,EAA+B,CAAC,EAAG,CACnCnB,EACG,OAAOO,GAAeA,EAAY,QAAUH,CAAK,EACjD,QAAQ,CAACJ,EAAcoB,EAAKC,IAAa,CACxC,IAAMC,EAASF,IAAQC,EAAS,OAAS,EACnCE,EAAaD,EAAS,qBAAQ,qBAC9B,CAAE,MAAAE,EAAO,MAAApB,EAAO,SAAAK,CAAS,EAAIT,EAC7ByB,EAAUD,EAAM,MAAM,GAAG,EAAE,MAAMpB,CAAK,EAAE,KAAK,GAAG,EAChDsB,EAAc,IAAI,MAAMtB,CAAK,EAAE,KAAK,IAAI,EAAE,IAAI,CAACuB,EAAGP,IAClDD,EAAkBC,CAAG,IAAM,GAAa,OAChC,WACb,EAAE,KAAK,EAAE,EACV,QAAQ,IAAI,GAAGM,CAAW,GAAGH,CAAU,IAAIE,CAAO,EAAE,EACpDf,EAAiBD,EAAUL,EAAQ,EAAG,CAAC,GAAGe,EAAmBG,CAAM,CAAC,CACtE,CAAC,CACL",
|
|
6
6
|
"names": ["program", "isInDirectory", "Subpaths", "CWD", "parseBoolean", "_depth", "options", "depth", "subpathsData", "makeRegexp", "reduced", "subpath", "level", "getLevel", "thisSubpathData", "subpathData", "parent", "children", "printSubpathData", "val", "strVal", "strRegexp", "validRegexpRegexp", "inputMatches", "pattern", "flags", "path", "parentsAreLastMap", "pos", "filtered", "isLast", "indentChar", "value", "toPrint", "indentChars", "e"]
|
|
7
7
|
}
|