@kunver/new 1.4.0 → 1.4.1

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/dist/index.js CHANGED
@@ -1,92 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{input as Ie,select as E}from"@inquirer/prompts";import{execa as ie}from"execa";import v from"chalk";import oe from"ora";async function m(e,t,n){let r;switch(e){case"pnpm":r=`cd ${t} && pnpm install`;break;case"npm":r=`cd ${t} && npm install`;break;case"bun":r=`cd ${t} && bun install`;break;default:r=`cd ${t} && pnpm install`}let s=oe("Installing dependencies with "+v.blue(e)).start();try{return await ie(r,{shell:!0,cwd:n}),s.succeed("Installed dependencies for "+v.blue(t)),!0}catch{return s.fail("Failed to install dependencies for "+v.blue(t)),!1}}import{readFileSync as ce,writeFileSync as I}from"fs";import{execa as le}from"execa";import k from"ora";import pe from"chalk";function de(e,t){let n=`${t}/${e}/vite.config.ts`,r=k("Editing vite.config.ts...").start();try{let s=ce(n,"utf-8");s.includes('import tailwindcss from "@tailwindcss/vite"')?r.info("Tailwind import already exists in vite.config.ts"):(s=`import tailwindcss from "@tailwindcss/vite"
3
- `+s,s=s.replace(/plugins:\s*\[.*?\]/,"plugins: [react(), tailwindcss()]"),I(n,s,"utf-8"),r.succeed("Updated vite.config.ts with Tailwind import"))}catch(s){r.fail(`Failed to edit vite.config.ts: ${s}`),console.error(s)}}function me(e,t){let n=`${t}/${e}/src/index.css`,r='@import "tailwindcss";',s=k("Adding Tailwind directive to index.css...").start();I(n,r,"utf-8"),s.succeed("Added Tailwind directive to index.css")}async function W(e,t,n){let r="cd "+t+" && "+e+" install tailwindcss @tailwindcss/vite",s=k("Installing Tailwind with "+pe.blue(e)).start();try{return await le(r,{shell:!0,cwd:n}),s.succeed("Installed tailwind"),de(t,n),me(t,n),!0}catch{return s.fail("Failed to install tailwind"),!1}}var O=`
4
- {
5
- "semi": false,
6
- "trailingComma": "all",
7
- "singleQuote": false,
8
- "printWidth": 120,
9
- "tabWidth": 2,
10
- "useTabs": false,
11
- "jsxSingleQuote": false,
12
- "jsxBracketSameLine": false,
13
- "arrowParens": "avoid"
14
- }
15
- `,D=`
16
- #!/bin/bash
17
-
18
- # Exit immediately if a command fails
19
- set -e
20
-
21
- # Switch to the main branch
22
- git checkout main
23
-
24
- # Merge the dev branch into main
25
- git merge dev
26
- if [ $? -ne 0 ]; then
27
- echo "\u274C Merge conflict occurred. Please resolve it manually."
28
- exit 1
29
- fi
30
-
31
- # Push changes to GitHub
32
- git push origin main
33
- if [ $? -ne 0 ]; then
34
- echo "\u274C Failed to push changes to GitHub. Please check your network connection and permissions."
35
- exit 1
36
- fi
37
-
38
- echo "\u2705 Successfully merged 'dev' into 'main' and pushed to GitHub!"
39
-
40
- git checkout dev
41
- if [ $? -ne 0 ]; then
42
- echo "\u274C Failed to switch back to the 'dev' branch."
43
- exit 1
44
- fi
45
- `;import{writeFile as B,access as ue}from"fs/promises";import{join as $}from"path";import{execSync as fe}from"child_process";import H from"chalk";import ge from"ora";async function u(e,t){let n=$(t,e),r=$(n,"push.sh"),s=ge("Copying config files to "+H.blue(e)).start();try{await ue(n),await Promise.all([B($(n,".prettierrc.json"),O),B(r,D)]);try{fe(`chmod +x "${r}"`)}catch{console.error(H.red("Failed to make push.sh executable"))}s.succeed("Config files copied and push.sh is executable")}catch(a){throw s.fail("Failed to copy config files or set permissions"),console.error(a),a}}import{execa as we}from"execa";import he from"ora";import C from"chalk";async function X(e,t,n){let r;switch(e){case"pnpm":r=`pnpm create vite ${t} --template react-swc-ts`;break;case"npm":r=`npm create vite@latest ${t} -- --template react-swc-ts`;break;case"bun":r=`bun create vite ${t} --template react-swc-ts`;break;default:r=`pnpm create vite ${t} --template react-swc-ts`}let s=he("Creating React project "+C.blue(t)).start();try{return await we(r,{shell:!0,cwd:n}),s.succeed("Created React project at "+C.blue(t)),!0}catch{return s.fail("Failed to create React project at "+C.blue(t)),!1}}import xe from"ora";import d from"chalk";var{spawn:ye}=await import("child_process");async function f(e,t){let n=xe("Approving builds for "+d.blue(e)).start();try{return new Promise(r=>{let s=ye("pnpm",["approve-builds"],{cwd:`${t}/${e}`,stdio:["pipe","inherit","inherit"],shell:!0});setTimeout(()=>{s.stdin?.write(`a
46
- `),setTimeout(()=>{s.stdin?.write(`y
47
- `),s.stdin?.end()},1e3)},2e3),s.on("close",a=>{a===0?(n.succeed("Approved builds for "+d.blue(e)),r(!0)):(n.fail("Failed to approve builds for "+d.blue(e)),r(!1))}),s.on("error",a=>{n.fail("Failed to approve builds for "+d.blue(e)),console.error(a),r(!1)})})}catch(r){return n.fail("Failed to approve builds for "+d.blue(e)),console.error(r),!1}}import{execa as be}from"execa";import ve from"ora";import F from"chalk";async function g(e,t){let n=`cd ${e} && bun pm trust --all`,r=ve("Approving builds for "+F.blue(e)).start();try{return await be(n,{shell:!0,cwd:t}),r.succeed("Approved builds for "+F.blue(e)),!0}catch{return r.fail("Failed to approve builds for "+F.blue(e)),!1}}import{writeFile as U,unlink as z,rm as ke,access as J}from"fs/promises";import l from"ora";import{execa as $e}from"execa";async function G(e,t){let n=`${t}/${e}/README.md`,r=l("Editing README.md...").start();try{let s=`# ${e}`;await U(n,s,"utf-8"),r.succeed("Updated README.md")}catch(s){r.fail(`Failed to edit README.md: ${s}`),console.error(s)}}async function Q(e,t){let n=`${t}/${e}/src/assets`,r=l("Deleting assets...").start();try{await ke(n,{recursive:!0,force:!0}),r.succeed("Deleted assets")}catch(s){r.fail(`Failed to delete assets: ${s}`),console.error(s)}}async function L(e,t){let n=`${t}/${e}/src/app.css`,r=l("Deleting app.css...").start();try{await J(n),await z(n),r.succeed("Deleted app.css")}catch(s){s.code==="ENOENT"?r.info("app.css not found (already deleted or doesn't exist)"):(r.fail(`Failed to delete app.css: ${s}`),console.error(s))}}async function V(e,t){let n=`${t}/${e}/src/app.tsx`,r=l("Clearing app.tsx...").start(),s=`
48
- function App() {
49
- return (
50
- <>
51
- <h1 className="text-3xl font-bold underline">Hello</h1>
52
- </>
53
- )
54
- }
55
-
56
- export default App
57
- `;try{await U(n,s,"utf-8"),r.succeed("Cleared app.tsx")}catch(a){r.fail(`Failed to clear app.tsx: ${a}`),console.error(a)}}async function _(e,t){let n=`${t}/${e}/eslint.config.js`,r=l("Deleting eslint.config.js...").start();try{await J(n),await z(n),r.succeed("Deleted eslint.config.js")}catch(s){s.code==="ENOENT"?r.info("eslint.config.js not found (already deleted or doesn't exist)"):(r.fail(`Failed to delete eslint.config.js: ${s}`),console.error(s))}}async function q(e,t,n){let r="cd "+e+" && "+t+" remove @eslint/js eslint eslint-plugin-react-hooks eslint-plugin-react-refresh globals typescript-eslint",s=l("Removing packages...").start();try{return await $e(r,{shell:!0,cwd:n}),s.succeed("Removed packages"),!0}catch(a){return s.fail("Failed to remove packages"),console.error(a),!1}}async function K(e,t,n){await Promise.all([L(e,n),Q(e,n),_(e,n),V(e,n),G(e,n),q(e,t,n)])}async function Y(e){let{name:t,packageManager:n,cwd:r=process.cwd()}=e;try{if(!await X(n,t,r))throw new Error("Failed to create React project");if(!await m(n,t,r))throw new Error("Failed to install dependencies");if(await u(t,r),!await W(n,t,r))throw new Error("Failed to install Tailwind");return n==="pnpm"?await f(t,r):n==="bun"&&await g(t,r),await K(t,n,r),!0}catch(s){throw console.error("Error creating React project:",s),s}}import{execa as Ce}from"execa";import Fe from"ora";import T from"chalk";async function Z(e,t,n,r){let s;switch(t){case"pnpm":s=`pnpm dlx wxt@latest init ${n} -t ${e} --pm ${t}`;break;case"npm":s=`npx wxt@latest init ${n} -t ${e} --pm ${t}`;break;case"bun":s=`bunx wxt@latest init ${n} -t ${e} --pm ${t}`;break;default:s=`bun wxt@latest init ${n} -t ${e} --pm ${t}`}let a=Fe("Creating WXT project "+T.blue(n)).start();try{return await Ce(s,{shell:!0,cwd:r}),a.succeed("Created WXT project at "+T.blue(n)),!0}catch{return a.fail("Failed to create WXT project at "+T.blue(n)),!1}}import{select as Ee}from"@inquirer/prompts";import je from"chalk";import{rm as w,mkdir as Te,writeFile as c,readFile as A}from"fs/promises";import{join as i}from"path";import{execa as Ae}from"execa";import Se from"ora";import N from"chalk";async function ee(e,t,n){let r=Se("Finalizing WXT Svelte project setup...").start();try{r.text="Cleaning up default files...",await w(i(t,"src","assets","svelte.svg")),await w(i(t,"src","entrypoints","popup","app.css")),await w(i(t,"src","entrypoints","content.ts")),await w(i(t,"src","lib","Counter.svelte")),r.text="Creating content script files...";let s=i(t,"src","entrypoints","content");await Te(s),await c(i(s,"App.svelte"),`<script lang="ts">
58
- let message = "Hello World"
59
- </script>
60
-
61
- <h1 class="text-3xl fixed top-20 left-20 z-50">{message}</h1>`),await c(i(s,"index.ts"),`import App from "./App.svelte"
62
- import { mount, unmount } from "svelte"
63
-
64
- export default defineContentScript({
65
- matches: ["<all_urls>"],
66
- cssInjectionMode: "ui",
67
-
68
- async main(ctx) {
69
- const ui = await createShadowRootUi(ctx, {
70
- name: "extension-ui",
71
- position: "inline",
72
- anchor: "body",
73
- onMount: container => {
74
- return mount(App, { target: container })
75
- },
76
- onRemove: app => {
77
- unmount(app as any)
78
- },
79
- })
80
- ui.mount()
81
- },
82
- })`),r.text="Installing Tailwind CSS...";let y=`${n} install tailwindcss @tailwindcss/vite`;await Ae(y,{shell:!0,cwd:t}),r.text="Configuring Tailwind CSS...",await c(i(t,"src","assets","tailwind.css"),'@import "tailwindcss";');let j=i(t,"wxt.config.ts"),p=await A(j,"utf-8");p='import tailwindcss from "@tailwindcss/vite"'+p,p=p.replace("defineConfig({",`defineConfig({
83
- vite: () => ({
84
- plugins: [tailwindcss()]
85
- }),
86
- webExt: {
87
- disabled: true
88
- },`),await c(j,p),r.text="Updating popup files...";let M=i(t,"src","entrypoints","popup","main.ts"),b=await A(M,"utf-8");b=b.replace("import './app.css'",'import "~/assets/tailwind.css"'),await c(M,b);let ae=i(t,"src","entrypoints","popup","App.svelte");await c(ae,`<script lang="ts">
89
- let message = "Hello World"
90
- </script>
91
-
92
- <h1 class="text-3xl">{message}</h1>`),r.text="Updating package.json...";let P=i(t,"package.json"),R=JSON.parse(await A(P,"utf-8"));return R.name=e,await c(P,JSON.stringify(R,null,2)),r.succeed(N.green("WXT Svelte project setup finished successfully!")),!0}catch(s){return r.fail(N.red(`Error during post-installation setup: ${s.message}`)),!1}}import{join as Me}from"path";var Pe=["react - !not ready","vue - !not ready","svelte","vanilla - !not ready","solid - !not ready"];async function te(e){let{name:t,packageManager:n,cwd:r=process.cwd(),selectedFramework:s}=e;try{let a=s||await Ee({message:je.bold.magenta("Select a framework for WXT"),choices:Pe,default:"svelte"});if(await Z(a,n,t,r)){let y=Me(r,t);await m(n,t,r),await u(t,r),a==="svelte"&&await ee(t,y,n),n==="pnpm"?await f(t,r):n==="bun"&&await g(t,r)}}catch(a){console.error(a)}}import{execa as Re}from"execa";import h from"chalk";async function re(e,t,n){console.log(h.white("Opening "+h.blue(e)+" in "+h.green(n)));try{return await Re(`${n} ${e}`,{shell:!0,cwd:t}),!0}catch(r){return console.error(h.red("Failed to open project in editor:"),r),!1}}var ne=["react-ts-tw","next-ts - !not ready","wxt","cpp-cmake - !not ready"],se=["bun","pnpm","npm"];async function S(e){switch(e.projectType){case"react-ts-tw":await Y({name:e.name,packageManager:e.packageManager});break;case"next-ts - !not ready":console.log("next-ts",e.packageManager,e.name);break;case"wxt":await te({name:e.name,packageManager:e.packageManager});break;case"cpp-cmake - !not ready":console.log("cpp-cmake",e.packageManager,e.name);break;default:console.log("Invalid project type",e.projectType);break}e.openInEditor!=="no"&&await re(e.name,process.cwd(),e.openInEditor)}import o from"chalk";import We from"fs";import Oe from"path";var De=await Ie({message:o.bold.blue("Enter a project name"),default:o.gray("my-project"),validate:e=>!e||e.trim().length<2?o.red("Project name must be at least 2 characters"):/^[a-z0-9]+(-[a-z0-9]+)*$/.test(e)?We.existsSync(Oe.resolve(process.cwd(),e))?o.red("A folder with that name already exists"):!0:o.red("Only lowercase letters, numbers, and single hyphens allowed. No spaces or special characters.")}),Be=await E({message:o.bold.green("Select a package manager"),choices:se,default:"bun"}),He=await E({message:o.bold.yellow("Select a project type"),default:"react-ts-tw",choices:ne}),Xe=await E({message:o.bold.cyan("Open in editor?"),choices:["no","windsurf","cursor","code"],default:"no"}),Ue={projectType:He,packageManager:Be,name:De,openInEditor:Xe};await S(Ue);
2
+ import{input as _,select as u}from"@inquirer/prompts";import{execa as v}from"execa";import d from"chalk";import T from"ora";async function i(e,t,a){let r;switch(e){case"pnpm":r=`cd ${t} && pnpm install`;break;case"npm":r=`cd ${t} && npm install`;break;case"bun":r=`cd ${t} && bun install`;break;default:r=`cd ${t} && pnpm install`}let o=T("Installing dependencies with "+d.blue(e)).start();try{return await v(r,{shell:!0,cwd:a}),o.succeed("Installed dependencies for "+d.blue(t)),!0}catch{return o.fail("Failed to install dependencies for "+d.blue(t)),!1}}import F from"fs-extra";import A from"ora";async function g(e,t){let a=A("Copying template folder...").start();try{return await F.copy(e,t),a.succeed("Copied template folder"),!0}catch{return a.fail("Failed to copy template folder"),!1}}import w from"ora";import s from"chalk";import{execa as I}from"execa";import{spawn as E}from"child_process";async function p(e,t){let a=w("Approving builds for "+s.blue(e)).start();try{return new Promise(r=>{let o=E("pnpm",["approve-builds"],{cwd:`${t}/${e}`,stdio:["pipe","inherit","inherit"],shell:!0});setTimeout(()=>{o.stdin?.write(`a
3
+ `),setTimeout(()=>{o.stdin?.write(`y
4
+ `),o.stdin?.end()},1e3)},2e3),o.on("close",n=>{n===0?(a.succeed("Approved builds for "+s.blue(e)),r(!0)):(a.fail("Failed to approve builds for "+s.blue(e)),r(!1))}),o.on("error",n=>{a.fail("Failed to approve builds for "+s.blue(e)),console.error(n),r(!1)})})}catch(r){return a.fail("Failed to approve builds for "+s.blue(e)),console.error(r),!1}}async function l(e,t){let a=`cd ${e} && bun pm trust --all`,r=w("Approving builds for "+s.blue(e)).start();try{return await I(a,{shell:!0,cwd:t}),r.succeed("Approved builds for "+s.blue(e)),!0}catch{return r.fail("Failed to approve builds for "+s.blue(e)),!1}}import{join as b}from"path";import{fileURLToPath as $}from"url";import P from"path";var O=$(import.meta.url),B=P.dirname(O);async function y(e){let{name:t,packageManager:a,cwd:r=process.cwd()}=e,o=b(B,"templates","react-ts-tw");try{if(!await g(o,b(r,t)))throw new Error("Failed to copy template folder");if(!await i(a,t,r))throw new Error("Failed to install dependencies");return a==="pnpm"?await p(t,r):a==="bun"&&await l(t,r),!0}catch(n){throw console.error("Error creating React project:",n),n}}import{select as C}from"@inquirer/prompts";import D from"chalk";import{join as S}from"path";var W=["react - !not ready","vue - !not ready","svelte","vanilla - !not ready","solid - !not ready"];async function h(e){let{name:t,packageManager:a,cwd:r=process.cwd(),selectedFramework:o}=e;try{let n=o||await C({message:D.bold.magenta("Select a framework for WXT"),choices:W,default:"svelte"});if(!1){let J=S(r,t);await i(a,t,r),a==="pnpm"?await p(t,r):a==="bun"&&await l(t,r)}}catch(n){console.error(n)}}import{execa as R}from"execa";import m from"chalk";async function k(e,t,a){console.log(m.white("Opening "+m.blue(e)+" in "+m.green(a)));try{return await R(`${a} ${e}`,{shell:!0,cwd:t}),!0}catch(r){return console.error(m.red("Failed to open project in editor:"),r),!1}}var x=["react-ts-tw","next-ts - !not ready","wxt","cpp-cmake - !not ready"],j=["bun","pnpm","npm"];async function f(e){switch(e.projectType){case"react-ts-tw":await y({name:e.name,packageManager:e.packageManager});break;case"next-ts - !not ready":console.log("next-ts",e.packageManager,e.name);break;case"wxt":await h({name:e.name,packageManager:e.packageManager});break;case"cpp-cmake - !not ready":console.log("cpp-cmake",e.packageManager,e.name);break;default:console.log("Invalid project type",e.projectType);break}e.openInEditor!=="no"&&await k(e.name,process.cwd(),e.openInEditor)}import c from"chalk";import z from"fs";import L from"path";var U=await _({message:c.bold.blue("Enter a project name"),default:c.gray("my-project"),validate:e=>!e||e.trim().length<2?c.red("Project name must be at least 2 characters"):/^[a-z0-9]+(-[a-z0-9]+)*$/.test(e)?z.existsSync(L.resolve(process.cwd(),e))?c.red("A folder with that name already exists"):!0:c.red("Only lowercase letters, numbers, and single hyphens allowed. No spaces or special characters.")}),X=await u({message:c.bold.green("Select a package manager"),choices:j,default:"bun"}),q=await u({message:c.bold.yellow("Select a project type"),default:"react-ts-tw",choices:x}),G=await u({message:c.bold.cyan("Open in editor?"),choices:["no","windsurf","cursor","code"],default:"no"}),H={projectType:q,packageManager:X,name:U,openInEditor:G};await f(H);
@@ -0,0 +1,12 @@
1
+ {
2
+ "semi": false,
3
+ "trailingComma": "all",
4
+ "singleQuote": false,
5
+ "printWidth": 120,
6
+ "tabWidth": 2,
7
+ "useTabs": false,
8
+ "jsxSingleQuote": false,
9
+ "jsxBracketSameLine": false,
10
+ "arrowParens": "avoid",
11
+ "plugins": ["prettier-plugin-tailwindcss"]
12
+ }
@@ -0,0 +1 @@
1
+ # {project_name}
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>{project_name}</title>
8
+ </head>
9
+ <body>
10
+ <div id="root"></div>
11
+ <script type="module" src="/src/main.tsx"></script>
12
+ </body>
13
+ </html>
@@ -0,0 +1,64 @@
1
+ const { exec } = require("child_process")
2
+
3
+ function runCommand(command) {
4
+ return new Promise((resolve, reject) => {
5
+ exec(command, { shell: true }, (error, stdout, stderr) => {
6
+ if (error) {
7
+ console.log(`❌ Error occurred: ${error.message}`)
8
+ if (stderr) {
9
+ console.log(`Standard Error: ${stderr.trim()}`)
10
+ }
11
+ return resolve(false)
12
+ }
13
+ if (stdout) {
14
+ console.log(stdout.trim())
15
+ }
16
+ resolve(true)
17
+ })
18
+ })
19
+ }
20
+
21
+ async function publishAndPushOperations(command) {
22
+ console.log("Switching to main branch...")
23
+ if (!await runCommand("git checkout main")) {
24
+ process.exit(1)
25
+ }
26
+
27
+ console.log("Merging dev branch into main...")
28
+ if (!await runCommand("git merge dev")) {
29
+ console.log("❌ Merge conflict occurred. Please resolve it manually.")
30
+ process.exit(1)
31
+ }
32
+
33
+ console.log("Pushing changes to GitHub...")
34
+ if (!await runCommand("git push origin main")) {
35
+ console.log("❌ Failed to push changes to GitHub. Please check your network connection and permissions.")
36
+ process.exit(1)
37
+ }
38
+
39
+ console.log("✅ Successfully merged 'dev' into 'main' and pushed to GitHub!")
40
+
41
+ if (command === "publish") {
42
+ console.log("Publishing package (pnpm publish)...")
43
+ if (!await runCommand("pnpm publish")) {
44
+ console.log("❌ pnpm publish command failed.")
45
+ process.exit(1)
46
+ }
47
+ }
48
+
49
+ console.log("Switching back to dev branch...")
50
+ if (!await runCommand("git checkout dev")) {
51
+ console.log("❌ Failed to switch back to the 'dev' branch.")
52
+ process.exit(1)
53
+ }
54
+
55
+ console.log("✅ All operations completed.")
56
+ }
57
+
58
+ const commandArg = process.argv[2]
59
+
60
+ if (commandArg === "push" || commandArg === "publish") {
61
+ publishAndPushOperations(commandArg)
62
+ } else {
63
+ console.log(`Invalid or missing command: '${commandArg || ""}'. Usage: node manager.js [push|publish]`)
64
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "{project_name}",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "tsc -b && vite build",
9
+ "preview": "vite preview",
10
+ "manager": "node manager.js"
11
+ },
12
+ "dependencies": {
13
+ "@tailwindcss/vite": "^4.1.11",
14
+ "react": "^19.1.0",
15
+ "react-dom": "^19.1.0",
16
+ "tailwindcss": "^4.1.11"
17
+ },
18
+ "devDependencies": {
19
+ "@types/react": "^19.1.8",
20
+ "@types/react-dom": "^19.1.6",
21
+ "@vitejs/plugin-react-swc": "^3.10.2",
22
+ "prettier": "^3.6.2",
23
+ "prettier-plugin-tailwindcss": "^0.6.14",
24
+ "typescript": "~5.8.3",
25
+ "vite": "^7.0.4"
26
+ },
27
+ "trustedDependencies": [
28
+ "@swc/core",
29
+ "@tailwindcss/oxide"
30
+ ]
31
+ }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
@@ -0,0 +1,30 @@
1
+
2
+ #!/bin/bash
3
+
4
+ # Exit immediately if a command fails
5
+ set -e
6
+
7
+ # Switch to the main branch
8
+ git checkout main
9
+
10
+ # Merge the dev branch into main
11
+ git merge dev
12
+ if [ $? -ne 0 ]; then
13
+ echo "❌ Merge conflict occurred. Please resolve it manually."
14
+ exit 1
15
+ fi
16
+
17
+ # Push changes to GitHub
18
+ git push origin main
19
+ if [ $? -ne 0 ]; then
20
+ echo "❌ Failed to push changes to GitHub. Please check your network connection and permissions."
21
+ exit 1
22
+ fi
23
+
24
+ echo "✅ Successfully merged 'dev' into 'main' and pushed to GitHub!"
25
+
26
+ git checkout dev
27
+ if [ $? -ne 0 ]; then
28
+ echo "❌ Failed to switch back to the 'dev' branch."
29
+ exit 1
30
+ fi
@@ -0,0 +1,9 @@
1
+ function App() {
2
+ return (
3
+ <>
4
+ <h1 className="text-3xl font-bold underline">Hello</h1>
5
+ </>
6
+ )
7
+ }
8
+
9
+ export default App
@@ -0,0 +1 @@
1
+ @import "tailwindcss";
@@ -0,0 +1,10 @@
1
+ import { StrictMode } from 'react'
2
+ import { createRoot } from 'react-dom/client'
3
+ import './index.css'
4
+ import App from './App.tsx'
5
+
6
+ createRoot(document.getElementById('root')!).render(
7
+ <StrictMode>
8
+ <App />
9
+ </StrictMode>,
10
+ )
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
@@ -0,0 +1,27 @@
1
+ {
2
+ "compilerOptions": {
3
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
4
+ "target": "ES2022",
5
+ "useDefineForClassFields": true,
6
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
7
+ "module": "ESNext",
8
+ "skipLibCheck": true,
9
+
10
+ /* Bundler mode */
11
+ "moduleResolution": "bundler",
12
+ "allowImportingTsExtensions": true,
13
+ "verbatimModuleSyntax": true,
14
+ "moduleDetection": "force",
15
+ "noEmit": true,
16
+ "jsx": "react-jsx",
17
+
18
+ /* Linting */
19
+ "strict": true,
20
+ "noUnusedLocals": true,
21
+ "noUnusedParameters": true,
22
+ "erasableSyntaxOnly": true,
23
+ "noFallthroughCasesInSwitch": true,
24
+ "noUncheckedSideEffectImports": true
25
+ },
26
+ "include": ["src"]
27
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "files": [],
3
+ "references": [
4
+ { "path": "./tsconfig.app.json" },
5
+ { "path": "./tsconfig.node.json" }
6
+ ]
7
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "compilerOptions": {
3
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4
+ "target": "ES2023",
5
+ "lib": ["ES2023"],
6
+ "module": "ESNext",
7
+ "skipLibCheck": true,
8
+
9
+ /* Bundler mode */
10
+ "moduleResolution": "bundler",
11
+ "allowImportingTsExtensions": true,
12
+ "verbatimModuleSyntax": true,
13
+ "moduleDetection": "force",
14
+ "noEmit": true,
15
+
16
+ /* Linting */
17
+ "strict": true,
18
+ "noUnusedLocals": true,
19
+ "noUnusedParameters": true,
20
+ "erasableSyntaxOnly": true,
21
+ "noFallthroughCasesInSwitch": true,
22
+ "noUncheckedSideEffectImports": true
23
+ },
24
+ "include": ["vite.config.ts"]
25
+ }
@@ -0,0 +1,8 @@
1
+ import tailwindcss from "@tailwindcss/vite"
2
+ import { defineConfig } from 'vite'
3
+ import react from '@vitejs/plugin-react-swc'
4
+
5
+ // https://vite.dev/config/
6
+ export default defineConfig({
7
+ plugins: [react(), tailwindcss()],
8
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kunver/new",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Opiniated project starter",
5
5
  "type": "module",
6
6
  "bin": {
@@ -24,14 +24,17 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@inquirer/prompts": "^7.6.0",
27
+ "@types/fs-extra": "^11.0.4",
27
28
  "chalk": "^5.4.1",
28
29
  "execa": "^9.6.0",
30
+ "fs-extra": "^11.3.0",
29
31
  "ora": "^8.2.0"
30
32
  },
31
33
  "scripts": {
32
34
  "build": "tsup",
33
35
  "start": "pnpm run build && node dist/index.js",
34
36
  "local": "pnpm link --global",
37
+ "manager": "node manager.cjs",
35
38
  "test": "vitest run"
36
39
  }
37
40
  }