sprawlify 0.0.92 → 0.0.93

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.
Files changed (2) hide show
  1. package/dist/index.mjs +141 -13
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -8,7 +8,7 @@ import { existsSync } from "fs";
8
8
  import prompts from "prompts";
9
9
  import dedent from "dedent";
10
10
  //#region package.json
11
- var version = "0.0.92";
11
+ var version = "0.0.93";
12
12
  //#endregion
13
13
  //#region src/utils/file-helper.ts
14
14
  const FILE_BACKUP_SUFFIX = ".bak";
@@ -340,11 +340,101 @@ function createTemplate(config) {
340
340
  };
341
341
  }
342
342
  //#endregion
343
+ //#region \0@oxc-project+runtime@0.115.0/helpers/taggedTemplateLiteral.js
344
+ function _taggedTemplateLiteral(e, t) {
345
+ return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } }));
346
+ }
347
+ //#endregion
348
+ //#region src/templates/react.ts
349
+ var _templateObject;
350
+ //#endregion
343
351
  //#region src/templates/index.ts
344
352
  const templates = {
345
- react: createTemplate({ files: [{
346
- path: "tsconfig.app.json",
347
- content: dedent`{
353
+ react: createTemplate({ files: [
354
+ {
355
+ path: "src/root.tsx",
356
+ content: dedent`export function Root() {
357
+ return (
358
+ <div>
359
+ <h1 className="text-2xl font-bold">Welcome to Sprawlify + React!</h1>
360
+ <p className="mt-4 text-lg">This is your root component.</p>
361
+ </div>
362
+ )
363
+ }`
364
+ },
365
+ {
366
+ path: "src/main.tsx",
367
+ content: dedent`import { StrictMode } from 'react'
368
+ import { createRoot } from 'react-dom/client'
369
+ import { Root } from './root'
370
+ import './globals.css'
371
+
372
+ createRoot(document.getElementById('root')!).render(
373
+ <StrictMode>
374
+ <Root />
375
+ </StrictMode>,
376
+ )`
377
+ },
378
+ {
379
+ path: ".gitignore",
380
+ content: dedent`# Logs
381
+ logs
382
+ *.log
383
+ npm-debug.log*
384
+ yarn-debug.log*
385
+ yarn-error.log*
386
+ pnpm-debug.log*
387
+ lerna-debug.log*
388
+
389
+ node_modules
390
+ dist
391
+ dist-ssr
392
+ *.local
393
+
394
+ # Editor directories and files
395
+ .vscode/*
396
+ !.vscode/extensions.json
397
+ .idea
398
+ .DS_Store
399
+ *.suo
400
+ *.ntvs*
401
+ *.njsproj
402
+ *.sln
403
+ *.sw?`
404
+ },
405
+ {
406
+ path: "index.html",
407
+ content: dedent(_templateObject || (_templateObject = _taggedTemplateLiteral(["<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <title>Sprawlify + React</title>\n </head>\n <body>\n <div id=\"root\"></div>\n <script type=\"module\" src=\"/src/main.tsx\"><\/script>\n </body>\n</html>"])))
408
+ },
409
+ {
410
+ path: "package.json",
411
+ content: dedent`{
412
+ "private": true,
413
+ "version": "0.0.0",
414
+ "type": "module",
415
+ "scripts": {
416
+ "dev": "vite",
417
+ "build": "tsc -b && vite build",
418
+ "preview": "vite preview"
419
+ },
420
+ "dependencies": {
421
+ "react": "^19.2.4",
422
+ "react-dom": "^19.2.4"
423
+ },
424
+ "devDependencies": {
425
+ "@types/node": "^24.12.0",
426
+ "@types/react": "^19.2.14",
427
+ "@types/react-dom": "^19.2.3",
428
+ "@vitejs/plugin-react": "^6.0.1",
429
+ "globals": "^17.4.0",
430
+ "typescript": "~5.9.3",
431
+ "vite": "^8.0.0"
432
+ }
433
+ }`
434
+ },
435
+ {
436
+ path: "tsconfig.app.json",
437
+ content: dedent`{
348
438
  "compilerOptions": {
349
439
  "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
350
440
  "target": "ES2023",
@@ -369,21 +459,59 @@ const templates = {
369
459
  "noUncheckedSideEffectImports": true
370
460
  },
371
461
  "include": ["src"]
372
- }
373
- `
374
- }, {
375
- path: "tsconfig.json",
376
- content: dedent`{
462
+ }`
463
+ },
464
+ {
465
+ path: "tsconfig.json",
466
+ content: dedent`{
377
467
  "files": [],
378
468
  "references": [
379
469
  { "path": "./tsconfig.app.json" },
380
470
  { "path": "./tsconfig.node.json" }
381
471
  ]
382
472
  }`
383
- }] }),
384
- solid: createTemplate({}),
385
- svelte: createTemplate({}),
386
- vue: createTemplate({})
473
+ },
474
+ {
475
+ path: "tsconfig.node.json",
476
+ content: dedent`{
477
+ "compilerOptions": {
478
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
479
+ "target": "ES2023",
480
+ "lib": ["ES2023"],
481
+ "module": "ESNext",
482
+ "types": ["node"],
483
+ "skipLibCheck": true,
484
+ /* Bundler mode */
485
+ "moduleResolution": "bundler",
486
+ "allowImportingTsExtensions": true,
487
+ "verbatimModuleSyntax": true,
488
+ "moduleDetection": "force",
489
+ "noEmit": true,
490
+ /* Linting */
491
+ "strict": true,
492
+ "noUnusedLocals": true,
493
+ "noUnusedParameters": true,
494
+ "erasableSyntaxOnly": true,
495
+ "noFallthroughCasesInSwitch": true,
496
+ "noUncheckedSideEffectImports": true
497
+ },
498
+ "include": ["vite.config.ts"]
499
+ }`
500
+ },
501
+ {
502
+ path: "vite.config.ts",
503
+ content: dedent`import { defineConfig } from 'vite'
504
+ import react from '@vitejs/plugin-react'
505
+
506
+ export default defineConfig({
507
+ plugins: [react()],
508
+ })
509
+ `
510
+ }
511
+ ] }),
512
+ solid: createTemplate({ files: [] }),
513
+ svelte: createTemplate({ files: [] }),
514
+ vue: createTemplate({ files: [] })
387
515
  };
388
516
  //#endregion
389
517
  //#region src/commands/init/run-init.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprawlify",
3
- "version": "0.0.92",
3
+ "version": "0.0.93",
4
4
  "type": "module",
5
5
  "description": "A command-line interface for Sprawlify.",
6
6
  "author": "sprawlify <npm@sprawlify.com>",