@mxfb/cli 0.0.54 → 0.0.55

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.
@@ -1 +1 @@
1
- 0.0.54
1
+ 0.0.55
@@ -0,0 +1,257 @@
1
+ # Created by https://www.toptal.com/developers/gitignore/api/react,nextjs,node,windows,osx,linux
2
+ # Edit at https://www.toptal.com/developers/gitignore?templates=react,nextjs,node,windows,osx,linux
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
+ ### NextJS ###
20
+ # dependencies
21
+ /node_modules
22
+ /.pnp
23
+ .pnp.js
24
+
25
+ # testing
26
+ /coverage
27
+
28
+ # next.js
29
+ /.next/
30
+ /out/
31
+
32
+ # production
33
+ /build
34
+
35
+ # misc
36
+ .DS_Store
37
+ *.pem
38
+
39
+ # debug
40
+ npm-debug.log*
41
+ yarn-debug.log*
42
+ yarn-error.log*
43
+ .pnpm-debug.log*
44
+
45
+ # local env files
46
+ .env*.local
47
+
48
+ # vercel
49
+ .vercel
50
+
51
+ # typescript
52
+ *.tsbuildinfo
53
+ next-env.d.ts
54
+
55
+ ### Node ###
56
+ # Logs
57
+ logs
58
+ *.log
59
+ lerna-debug.log*
60
+
61
+ # Diagnostic reports (https://nodejs.org/api/report.html)
62
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
63
+
64
+ # Runtime data
65
+ pids
66
+ *.pid
67
+ *.seed
68
+ *.pid.lock
69
+
70
+ # Directory for instrumented libs generated by jscoverage/JSCover
71
+ lib-cov
72
+
73
+ # Coverage directory used by tools like istanbul
74
+ coverage
75
+ *.lcov
76
+
77
+ # nyc test coverage
78
+ .nyc_output
79
+
80
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
81
+ .grunt
82
+
83
+ # Bower dependency directory (https://bower.io/)
84
+ bower_components
85
+
86
+ # node-waf configuration
87
+ .lock-wscript
88
+
89
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
90
+ build/Release
91
+
92
+ # Dependency directories
93
+ node_modules/
94
+ jspm_packages/
95
+
96
+ # Snowpack dependency directory (https://snowpack.dev/)
97
+ web_modules/
98
+
99
+ # TypeScript cache
100
+
101
+ # Optional npm cache directory
102
+ .npm
103
+
104
+ # Optional eslint cache
105
+ .eslintcache
106
+
107
+ # Optional stylelint cache
108
+ .stylelintcache
109
+
110
+ # Microbundle cache
111
+ .rpt2_cache/
112
+ .rts2_cache_cjs/
113
+ .rts2_cache_es/
114
+ .rts2_cache_umd/
115
+
116
+ # Optional REPL history
117
+ .node_repl_history
118
+
119
+ # Output of 'npm pack'
120
+ *.tgz
121
+
122
+ # Yarn Integrity file
123
+ .yarn-integrity
124
+
125
+ # dotenv environment variable files
126
+ .env
127
+ .env.development.local
128
+ .env.test.local
129
+ .env.production.local
130
+ .env.local
131
+
132
+ # parcel-bundler cache (https://parceljs.org/)
133
+ .cache
134
+ .parcel-cache
135
+
136
+ # Next.js build output
137
+ .next
138
+ out
139
+
140
+ # Nuxt.js build / generate output
141
+ .nuxt
142
+ dist
143
+
144
+ # Gatsby files
145
+ .cache/
146
+ # Comment in the public line in if your project uses Gatsby and not Next.js
147
+ # https://nextjs.org/blog/next-9-1#public-directory-support
148
+ # public
149
+
150
+ # vuepress build output
151
+ .vuepress/dist
152
+
153
+ # vuepress v2.x temp and cache directory
154
+ .temp
155
+
156
+ # Docusaurus cache and generated files
157
+ .docusaurus
158
+
159
+ # Serverless directories
160
+ .serverless/
161
+
162
+ # FuseBox cache
163
+ .fusebox/
164
+
165
+ # DynamoDB Local files
166
+ .dynamodb/
167
+
168
+ # TernJS port file
169
+ .tern-port
170
+
171
+ # Stores VSCode versions used for testing VSCode extensions
172
+ .vscode-test
173
+
174
+ # yarn v2
175
+ .yarn/cache
176
+ .yarn/unplugged
177
+ .yarn/build-state.yml
178
+ .yarn/install-state.gz
179
+ .pnp.*
180
+
181
+ ### Node Patch ###
182
+ # Serverless Webpack directories
183
+ .webpack/
184
+
185
+ # Optional stylelint cache
186
+
187
+ # SvelteKit build / generate output
188
+ .svelte-kit
189
+
190
+ ### OSX ###
191
+ # General
192
+ .AppleDouble
193
+ .LSOverride
194
+
195
+ # Icon must end with two \r
196
+ Icon
197
+
198
+
199
+ # Thumbnails
200
+ ._*
201
+
202
+ # Files that might appear in the root of a volume
203
+ .DocumentRevisions-V100
204
+ .fseventsd
205
+ .Spotlight-V100
206
+ .TemporaryItems
207
+ .Trashes
208
+ .VolumeIcon.icns
209
+ .com.apple.timemachine.donotpresent
210
+
211
+ # Directories potentially created on remote AFP share
212
+ .AppleDB
213
+ .AppleDesktop
214
+ Network Trash Folder
215
+ Temporary Items
216
+ .apdisk
217
+
218
+ ### react ###
219
+ .DS_*
220
+ **/*.backup.*
221
+ **/*.back.*
222
+
223
+ node_modules
224
+
225
+ *.sublime*
226
+
227
+ psd
228
+ thumb
229
+ sketch
230
+
231
+ ### Windows ###
232
+ # Windows thumbnail cache files
233
+ Thumbs.db
234
+ Thumbs.db:encryptable
235
+ ehthumbs.db
236
+ ehthumbs_vista.db
237
+
238
+ # Dump file
239
+ *.stackdump
240
+
241
+ # Folder config file
242
+ [Dd]esktop.ini
243
+
244
+ # Recycle Bin used on file shares
245
+ $RECYCLE.BIN/
246
+
247
+ # Windows Installer files
248
+ *.cab
249
+ *.msi
250
+ *.msix
251
+ *.msm
252
+ *.msp
253
+
254
+ # Windows shortcuts
255
+ *.lnk
256
+
257
+ # End of https://www.toptal.com/developers/gitignore/api/react,nextjs,node,windows,osx,linux
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import c from"node:process";import{promises as l,existsSync as h}from"node:fs";import w from"node:url";import o from"node:path";import{spawn as y}from"node:child_process";import{program as p}from"commander";import k from"prompts";import{promises as u}from"node:fs";async function d(t,e,...n){let[i,m]=n,r=await u.readFile(t,i),a=e(r),s=n.length===2?m:i;return await u.writeFile(t,a,s),a}var P=w.fileURLToPath(import.meta.url),j=o.dirname(P),f=c.cwd();p.name("@mxfb-cli/make-template").description("Generate in cwd a project template");p.command("html").description("make simple html project structure").action(x);p.command("react").description("make react + typescript project structure").action(S);p.parse(c.argv);async function x(){let t=o.join(j,"assets/html");if(!h(t))return console.error(`Could not find the template to copy at ${t}`),c.exit(1);let e=o.join(f,"html-template");await l.cp(t,e,{recursive:!0})}async function S(){let t=o.join(j,"assets/react");if(!h(t))return console.error(`Could not find the template to copy at ${t}`),c.exit(1);let e=o.join(f,"react-template");await l.cp(t,e,{recursive:!0});let{projectName:n}=await k({name:"projectName",message:"Project name ? (for package.json name field)",type:"text"}),i=o.join(e,"package.json");await d(i,r=>{let a=typeof r=="string"?r:r.toString(),s=JSON.parse(a);delete s.name;let g={name:n,...s};return`${JSON.stringify(g,null,2)}
3
- `},{encoding:"utf-8"});let m=y(`cd ${e} && npm i`,{stdio:"inherit",shell:!0});await new Promise((r,a)=>{m.on("exit",()=>r(!0)),m.on("error",()=>a(!1))}),await l.rename(e,o.join(f,n))}
2
+ import p from"node:process";import{promises as c,existsSync as h}from"node:fs";import y from"node:url";import e from"node:path";import{spawn as P}from"node:child_process";import{program as l}from"commander";import k from"prompts";import{promises as d}from"node:fs";async function g(t,r,...a){let[m,s]=a,n=await d.readFile(t,m),o=r(n),i=a.length===2?s:m;return await d.writeFile(t,o,i),o}var x=y.fileURLToPath(import.meta.url),j=e.dirname(x),f=p.cwd();l.name("@mxfb-cli/make-template").description("Generate in cwd a project template");l.command("html").description("make simple html project structure").action(S);l.command("react").description("make react + typescript project structure").action(b);l.parse(p.argv);async function S(){let t=e.join(j,"assets/html");if(!h(t))return console.error(`Could not find the template to copy at ${t}`),p.exit(1);let r=e.join(f,"html-template");await c.cp(t,r,{recursive:!0})}async function b(){let t=e.join(j,"assets/react");if(!h(t))return console.error(`Could not find the template to copy at ${t}`),p.exit(1);let r=e.join(f,"react-template");await c.cp(t,r,{recursive:!0});let{projectName:a}=await k({name:"projectName",message:"Project name ? (for package.json name field)",type:"text"}),m=e.join(r,"package.json");await g(m,o=>{let i=typeof o=="string"?o:o.toString(),u=JSON.parse(i);delete u.name;let w={name:a,...u};return`${JSON.stringify(w,null,2)}
3
+ `},{encoding:"utf-8"});let s=P(`cd ${r} && npm i`,{stdio:"inherit",shell:!0});await new Promise((o,i)=>{s.on("exit",()=>o(!0)),s.on("error",()=>i(!1))});let n=e.join(f,a);await c.rename(r,n),await c.rename(e.join(n,"gitignore"),e.join(n,".gitignore"))}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mxfb/cli",
3
- "version": "0.0.54",
3
+ "version": "0.0.55",
4
4
  "description": "",
5
5
  "author": "Maxime Fabas",
6
6
  "license": "ISC",