|
| 1 | +> vite new -h # show help |
| 2 | + |
| 3 | +vite new - Create a new Vite+ project |
| 4 | + |
| 5 | +Usage: |
| 6 | + vite new [project-name] [project-type] [options] |
| 7 | + vite new --app <path> Add an app to existing monorepo |
| 8 | + vite new --lib <path> Add a library to existing monorepo |
| 9 | + |
| 10 | +Arguments: |
| 11 | + project-name Name of the project to create |
| 12 | + project-type Type of project: monorepo, mono, singlerepo, single |
| 13 | + |
| 14 | +Options: |
| 15 | + --monorepo, -m Create a monorepo project |
| 16 | + --singlerepo, -s Create a singlerepo project |
| 17 | + --app <path> Add an app package to existing monorepo |
| 18 | + --lib <path> Add a library package to existing monorepo |
| 19 | + --help, -h Show this help message |
| 20 | + |
| 21 | +Examples: |
| 22 | + vite new Interactive mode (prompts for all options) |
| 23 | + vite new my-project Create project with prompts for type |
| 24 | + vite new my-project monorepo Create monorepo without prompts |
| 25 | + vite new my-project -s Create singlerepo using flag |
| 26 | + vite new --app apps/my-app Add app to current monorepo |
| 27 | + vite new --lib packages/utils Add library to current monorepo |
| 28 | + |
| 29 | +Notes: |
| 30 | + - MonoRepo is the default when prompted (press Enter to select) |
| 31 | + - Press Ctrl+C to exit during prompts |
| 32 | + |
| 33 | + |
| 34 | +> vite new my-project monorepo # create monorepo |
| 35 | + |
| 36 | +Creating monorepo project: my-project... |
| 37 | +✅ Successfully created monorepo project: my-project |
| 38 | + |
| 39 | +Next steps: |
| 40 | + cd my-project |
| 41 | + vite run ready |
| 42 | + vite dev |
| 43 | + |
| 44 | +To add new packages to your monorepo: |
| 45 | + vite new --app apps/my-app |
| 46 | + vite new --lib packages/my-lib |
| 47 | + |
| 48 | +> cd my-project && git init # avoid oxlint https://github.com/oxc-project/oxc/issues/13793 |
| 49 | +Initialized empty Git repository in /private<cwd>/my-project/.git/ |
| 50 | + |
| 51 | +> cd my-project && vite run ready # run ready task |
| 52 | +Cache not found |
| 53 | +Scope: all <variable> workspace projects |
| 54 | +Progress: resolved 1, reused 0, downloaded 0, added 0 |
| 55 | +Progress: resolved 27, reused 26, downloaded 0, added 0 |
| 56 | + WARN Skip adding vite to the default catalog because it already exists as npm:@voidzero-dev/vite-plus. Please use `pnpm update` to update the catalogs. |
| 57 | + WARN Skip adding @voidzero-dev/vite-plus to the default catalog because it already exists as latest. Please use `pnpm update` to update the catalogs. |
| 58 | + WARN Skip adding vitest to the default catalog because it already exists as beta. Please use `pnpm update` to update the catalogs. |
| 59 | + WARN Skip adding vite to the default catalog because it already exists as npm:@voidzero-dev/vite-plus. Please use `pnpm update` to update the catalogs. |
| 60 | +Progress: resolved 172, reused 85, downloaded 0, added 0 |
| 61 | +Packages: +<variable> |
| 62 | ++<repeat> |
| 63 | +Progress: resolved <variable>, reused <variable>, downloaded <variable>, added <variable>, done |
| 64 | + |
| 65 | +devDependencies: |
| 66 | ++ @voidzero-dev/vite-plus <semver> |
| 67 | ++ vitest <semver> |
| 68 | + |
| 69 | +╭ Warning ─────────────────────────────────────────────────────────────────────╮ |
| 70 | +│ │ |
| 71 | +│ Ignored build scripts: esbuild. │ |
| 72 | +│ Run "pnpm approve-builds" to pick which dependencies should be allowed │ |
| 73 | +│ to run scripts. │ |
| 74 | +│ │ |
| 75 | +╰──────────────────────────────────────────────────────────────────────────────╯ |
| 76 | + |
| 77 | +Done in <variable>ms using pnpm v<semver> |
| 78 | +Cache not found |
| 79 | +Cache not found |
| 80 | +Cache not found |
| 81 | +Cache not found |
| 82 | +Cache not found |
| 83 | +Cache not found |
| 84 | +Cache not found |
| 85 | +Cache not found |
| 86 | +Cache not found |
| 87 | +rolldown-vite v<semver> building for production... |
| 88 | +[2Ktransforming...[32m✓[39m 7 modules transformed. |
| 89 | +rendering chunks... |
| 90 | +computing gzip size... |
| 91 | +[2mdist/[22m[32mindex.html [39m[1m[2m0.45 kB[22m[22m[2m │ gzip: 0.29 kB[22m |
| 92 | +[2mdist/[22m[2massets/[22m[35mindex-BAKMvvYC.css [39m[1m[2m1.37 kB[22m[22m[2m │ gzip: 0.65 kB[22m |
| 93 | +[2mdist/[22m[2massets/[22m[36mindex-vM1AmoRk.js [39m[1m[2m3.04 kB[22m[22m[2m │ gzip: 1.64 kB[22m |
| 94 | +✓ built in <variable>ms |
| 95 | + |
| 96 | +> cd my-project && vite new --app apps/my-app # add app |
| 97 | +Creating new app at apps/my-app... |
| 98 | +✅ Successfully created app at apps/my-app |
| 99 | + |
| 100 | +Next steps: |
| 101 | + cd apps/my-app |
| 102 | + vite run ready |
| 103 | + vite dev |
| 104 | + |
| 105 | +> cd my-project && vite new --lib packages/my-lib # add lib |
| 106 | +Creating new library at packages/my-lib... |
| 107 | +✅ Successfully created library at packages/my-lib |
| 108 | + |
| 109 | +Next steps: |
| 110 | + cd packages/my-lib |
| 111 | + vite run ready |
| 112 | + |
| 113 | +> cd my-project && vite run ready # run ready task after add app and lib |
| 114 | +Cache miss: apps content changed |
| 115 | +Scope: all <variable> workspace projects |
| 116 | +Progress: resolved 1, reused 0, downloaded 0, added 0 |
| 117 | +Progress: resolved 157, reused 71, downloaded 0, added 0 |
| 118 | +Progress: resolved 171, reused 85, downloaded 0, added 0 |
| 119 | + WARN Skip adding typescript to the default catalog because it already exists as ^5.9.2. Please use `pnpm update` to update the catalogs. |
| 120 | + WARN Skip adding vite to the default catalog because it already exists as npm:@voidzero-dev/vite-plus. Please use `pnpm update` to update the catalogs. |
| 121 | + WARN Skip adding typescript to the default catalog because it already exists as ^5.9.2. Please use `pnpm update` to update the catalogs. |
| 122 | + WARN Skip adding vite to the default catalog because it already exists as npm:@voidzero-dev/vite-plus. Please use `pnpm update` to update the catalogs. |
| 123 | + WARN Skip adding @voidzero-dev/vite-plus to the default catalog because it already exists as latest. Please use `pnpm update` to update the catalogs. |
| 124 | + WARN Skip adding vitest to the default catalog because it already exists as beta. Please use `pnpm update` to update the catalogs. |
| 125 | + WARN Skip adding vite to the default catalog because it already exists as npm:@voidzero-dev/vite-plus. Please use `pnpm update` to update the catalogs. |
| 126 | +Already up to date |
| 127 | +Progress: resolved <variable>, reused <variable>, downloaded <variable>, added <variable>, done |
| 128 | + |
| 129 | +Done in <variable>ms using pnpm v<semver> |
| 130 | +Cache not found |
| 131 | +Cache not found |
| 132 | +Cache not found |
| 133 | +Cache not found |
| 134 | +Cache not found |
| 135 | +Cache not found |
| 136 | +Cache not found |
| 137 | +Cache not found |
| 138 | +Cache hit, replaying |
| 139 | +rolldown-vite v<semver> building for production... |
| 140 | +[2Ktransforming...[32m✓[39m 7 modules transformed. |
| 141 | +rendering chunks... |
| 142 | +computing gzip size... |
| 143 | +[2mdist/[22m[32mindex.html [39m[1m[2m0.45 kB[22m[22m[2m │ gzip: 0.29 kB[22m |
| 144 | +[2mdist/[22m[2massets/[22m[35mindex-BAKMvvYC.css [39m[1m[2m1.37 kB[22m[22m[2m │ gzip: 0.65 kB[22m |
| 145 | +[2mdist/[22m[2massets/[22m[36mindex-vM1AmoRk.js [39m[1m[2m3.04 kB[22m[22m[2m │ gzip: 1.64 kB[22m |
| 146 | +✓ built in <variable>ms |
| 147 | +Cache not found |
| 148 | +Cache not found |
| 149 | +rolldown-vite v<semver> building for production... |
| 150 | +[2Ktransforming...[32m✓[39m 7 modules transformed. |
| 151 | +rendering chunks... |
| 152 | +computing gzip size... |
| 153 | +[2mdist/[22m[32mindex.html [39m[1m[2m0.45 kB[22m[22m[2m │ gzip: 0.29 kB[22m |
| 154 | +[2mdist/[22m[2massets/[22m[35mindex-BAKMvvYC.css [39m[1m[2m1.37 kB[22m[22m[2m │ gzip: 0.65 kB[22m |
| 155 | +[2mdist/[22m[2massets/[22m[36mindex-vM1AmoRk.js [39m[1m[2m3.04 kB[22m[22m[2m │ gzip: 1.64 kB[22m |
| 156 | +✓ built in <variable>ms |
| 157 | + |
| 158 | +> cd my-project && vite new --lib tools/my-tool # add lib new not exists tools directory |
| 159 | +Creating new library at tools/my-tool... |
| 160 | +✅ Successfully created library at tools/my-tool |
| 161 | + |
| 162 | +Next steps: |
| 163 | + cd tools/my-tool |
| 164 | + vite run ready |
| 165 | + |
| 166 | +> cd my-project && vite run ready # run ready task after add lib |
| 167 | +Cache miss: content changed |
| 168 | +Scope: all <variable> workspace projects |
| 169 | +Lockfile is up to date, resolution step is skipped |
| 170 | +Already up to date |
| 171 | + |
| 172 | +Done in <variable>ms using pnpm v<semver> |
| 173 | +Cache not found |
| 174 | +Cache not found |
| 175 | +Cache not found |
| 176 | +Cache not found |
| 177 | +Cache not found |
| 178 | +Cache not found |
| 179 | +Cache not found |
| 180 | +Cache not found |
| 181 | +Cache hit, replaying |
| 182 | +rolldown-vite v<semver> building for production... |
| 183 | +[2Ktransforming...[32m✓[39m 7 modules transformed. |
| 184 | +rendering chunks... |
| 185 | +computing gzip size... |
| 186 | +[2mdist/[22m[32mindex.html [39m[1m[2m0.45 kB[22m[22m[2m │ gzip: 0.29 kB[22m |
| 187 | +[2mdist/[22m[2massets/[22m[35mindex-BAKMvvYC.css [39m[1m[2m1.37 kB[22m[22m[2m │ gzip: 0.65 kB[22m |
| 188 | +[2mdist/[22m[2massets/[22m[36mindex-vM1AmoRk.js [39m[1m[2m3.04 kB[22m[22m[2m │ gzip: 1.64 kB[22m |
| 189 | +✓ built in <variable>ms |
| 190 | +Cache not found |
| 191 | +Cache hit, replaying |
| 192 | +rolldown-vite v<semver> building for production... |
| 193 | +[2Ktransforming...[32m✓[39m 7 modules transformed. |
| 194 | +rendering chunks... |
| 195 | +computing gzip size... |
| 196 | +[2mdist/[22m[32mindex.html [39m[1m[2m0.45 kB[22m[22m[2m │ gzip: 0.29 kB[22m |
| 197 | +[2mdist/[22m[2massets/[22m[35mindex-BAKMvvYC.css [39m[1m[2m1.37 kB[22m[22m[2m │ gzip: 0.65 kB[22m |
| 198 | +[2mdist/[22m[2massets/[22m[36mindex-vM1AmoRk.js [39m[1m[2m3.04 kB[22m[22m[2m │ gzip: 1.64 kB[22m |
| 199 | +✓ built in <variable>ms |
|
0 commit comments