vite-plus 0.1.20-alpha.4 → 0.1.21-alpha.0
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/LICENSE +28 -0
- package/README.md +10 -0
- package/dist/{agent-D_WSpD0r.js → agent-C8Me6C5u.js} +14 -2
- package/dist/bin.js +1 -1
- package/dist/config/bin.js +1 -1
- package/dist/create/bin.js +847 -57
- package/dist/{define-config-hLuWEqIf.d.ts → define-config-bKSulJaG.d.ts} +14 -0
- package/dist/define-config.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/migration/bin.js +3 -3
- package/dist/pack-bin.js +1 -1
- package/dist/{package-D_LD1iiI.js → package-CrKanQYM.js} +135 -4
- package/dist/{resolve-vite-config-B_w1u1j4.js → resolve-vite-config-C1KX9CZU.js} +1 -1
- package/dist/staged/bin.js +17 -17
- package/dist/version.js +1 -1
- package/dist/{workspace-DVOyShUK.js → workspace-BSMGz0AZ.js} +2 -2
- package/docs/config/build.md +1 -1
- package/docs/config/create.md +35 -0
- package/docs/config/fmt.md +1 -1
- package/docs/config/index.md +1 -1
- package/docs/config/lint.md +1 -1
- package/docs/config/pack.md +1 -1
- package/docs/config/run.md +14 -14
- package/docs/config/staged.md +1 -1
- package/docs/config/test.md +1 -1
- package/docs/guide/cache.md +2 -2
- package/docs/guide/ci.md +3 -3
- package/docs/guide/create.md +148 -1
- package/docs/guide/run.md +1 -1
- package/docs/guide/troubleshooting.md +3 -3
- package/package.json +13 -12
package/LICENSE
CHANGED
|
@@ -672,6 +672,34 @@ Repository: https://github.com/lukeed/mri
|
|
|
672
672
|
|
|
673
673
|
---------------------------------------
|
|
674
674
|
|
|
675
|
+
## nanotar
|
|
676
|
+
License: MIT
|
|
677
|
+
Repository: https://github.com/unjs/nanotar
|
|
678
|
+
|
|
679
|
+
> MIT License
|
|
680
|
+
>
|
|
681
|
+
> Copyright (c) Pooya Parsa <pooya@pi0.io>
|
|
682
|
+
>
|
|
683
|
+
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
684
|
+
> of this software and associated documentation files (the "Software"), to deal
|
|
685
|
+
> in the Software without restriction, including without limitation the rights
|
|
686
|
+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
687
|
+
> copies of the Software, and to permit persons to whom the Software is
|
|
688
|
+
> furnished to do so, subject to the following conditions:
|
|
689
|
+
>
|
|
690
|
+
> The above copyright notice and this permission notice shall be included in all
|
|
691
|
+
> copies or substantial portions of the Software.
|
|
692
|
+
>
|
|
693
|
+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
694
|
+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
695
|
+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
696
|
+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
697
|
+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
698
|
+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
699
|
+
> SOFTWARE.
|
|
700
|
+
|
|
701
|
+
---------------------------------------
|
|
702
|
+
|
|
675
703
|
## picocolors
|
|
676
704
|
License: ISC
|
|
677
705
|
By: Alexey Raspopov
|
package/README.md
CHANGED
|
@@ -150,6 +150,16 @@ vp create
|
|
|
150
150
|
|
|
151
151
|
You can run `vp create` inside of a project to add new apps or libraries to your project.
|
|
152
152
|
|
|
153
|
+
Organizations can expose a curated set of templates under their npm scope by
|
|
154
|
+
publishing `@org/create` with a `createConfig.templates` manifest in its `package.json`.
|
|
155
|
+
Once published, `vp create @org` opens an interactive picker over those
|
|
156
|
+
templates, and setting `create: { defaultTemplate: '@org' }` in
|
|
157
|
+
`vite.config.ts` makes it the default for bare `vp create`. See the
|
|
158
|
+
[Organization Templates guide](https://viteplus.dev/guide/create#organization-templates)
|
|
159
|
+
for the authoring workflow and
|
|
160
|
+
[`create.defaultTemplate`](https://viteplus.dev/config/create) for the
|
|
161
|
+
config reference.
|
|
162
|
+
|
|
153
163
|
### Migrating an existing project
|
|
154
164
|
|
|
155
165
|
You can migrate an existing project to Vite+:
|
|
@@ -3,7 +3,7 @@ import { c as VITE_PLUS_VERSION, i as BASEURL_TSCONFIG_WARNING, l as isForceOver
|
|
|
3
3
|
import { a as require_cross_spawn, i as runCommandSilently, n as hasBaseUrlInTsconfig, r as removeDeprecatedTsconfigFalseOption, t as findTsconfigFiles } from "./tsconfig-DQTf06oN.js";
|
|
4
4
|
import { t as accent } from "./terminal-CxTMfsxZ.js";
|
|
5
5
|
import { t as require_dist } from "./dist-DjG9AYbK.js";
|
|
6
|
-
import { c as
|
|
6
|
+
import { c as editJsonFile, l as isJsonFile, n as detectPackageMetadata, u as readJsonFile } from "./package-CrKanQYM.js";
|
|
7
7
|
import { n as addMigrationWarning, t as addManualStep } from "./report-DbrfjWiP.js";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import { downloadPackageManager, mergeJsonConfig, mergeTsdownConfig, rewriteEslint, rewriteImportsInDirectory, rewritePrettier, rewriteScripts } from "../binding/index.js";
|
|
@@ -4286,6 +4286,18 @@ function injectLintTypeCheckDefaults(projectPath, silent = false, report) {
|
|
|
4286
4286
|
function injectFmtDefaults(projectPath, silent = false, report) {
|
|
4287
4287
|
injectConfigDefaults(projectPath, "fmt", ".vite-plus-fmt-init.oxfmtrc.json", JSON.stringify({}), silent, report);
|
|
4288
4288
|
}
|
|
4289
|
+
/**
|
|
4290
|
+
* Wire `create.defaultTemplate: '<scope>'` into the new monorepo's
|
|
4291
|
+
* `vite.config.ts`. The caller is `bin.ts`, only when scaffolding a
|
|
4292
|
+
* monorepo from a bundled `@org` manifest entry — that's the case where
|
|
4293
|
+
* the user just picked a template from a specific org and naturally
|
|
4294
|
+
* wants subsequent `vp create` invocations from the workspace to default
|
|
4295
|
+
* to that same org's picker.
|
|
4296
|
+
*/
|
|
4297
|
+
function injectCreateDefaultTemplate(projectPath, scope, silent = false, report) {
|
|
4298
|
+
if (!scope) return;
|
|
4299
|
+
injectConfigDefaults(projectPath, "create", ".vite-plus-create-init.json", JSON.stringify({ defaultTemplate: scope }), silent, report);
|
|
4300
|
+
}
|
|
4289
4301
|
function injectConfigDefaults(projectPath, configKey, tempFileName, tempFileContent, silent, report) {
|
|
4290
4302
|
const configs = detectConfigs(projectPath);
|
|
4291
4303
|
if (configs.viteConfig) {
|
|
@@ -5120,4 +5132,4 @@ function getMarkedRange(content, startMarker, endMarker) {
|
|
|
5120
5132
|
};
|
|
5121
5133
|
}
|
|
5122
5134
|
//#endregion
|
|
5123
|
-
export {
|
|
5135
|
+
export { multiselect as $, setPackageManager as A, runViteFmt as B, migratePrettierToOxfmt as C, rewriteMonorepo as D, promptPrettierMigration as E, readYamlFile as F, templatesDir as G, selectPackageManager as H, cancelAndExit as I, require_semver as J, DependencyType as K, defaultInteractive as L, warnPackageLevelEslint as M, warnPackageLevelPrettier as N, rewriteMonorepoProject as O, editYamlFile as P, log as Q, downloadPackageManager$1 as R, migrateNodeVersionManagerFile as S, promptEslintMigration as T, upgradeYarn as U, runViteInstall as V, displayRelative as W, confirm as X, cancel as Y, intro as Z, hasStagedConfigInViteConfig as _, writeAgentInstructions as a, q as at, mergeViteConfigFiles as b, checkVitestVersion as c, detectEslintProject as d, outro as et, detectFramework as f, hasFrameworkShim as g, ensurePreCommitHook as h, updateExistingAgentInstructions as i, require_picocolors as it, warnLegacyEslintConfig as j, rewriteStandaloneProject as k, confirmEslintMigration as l, detectPrettierProject as m, detectExistingAgentTargetPaths as n, spinner as nt, addFrameworkShim as o, detectNodeVersionManagerFile as p, PackageManager as q, selectAgentTargetPaths as r, text as rt, checkViteVersion as s, detectAgentConflicts as t, select as tt, confirmPrettierMigration as u, injectCreateDefaultTemplate as v, preflightGitHooksSetup as w, migrateEslintToOxlint as x, installGitHooks as y, promptGitHooks as z };
|
package/dist/bin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as DEFAULT_ENVS, i as BASEURL_TSCONFIG_WARNING, o as VITE_PLUS_NAME, u as resolve$1 } from "./main-A6UrSTYb.js";
|
|
2
2
|
import { i as runCommandSilently, n as hasBaseUrlInTsconfig } from "./tsconfig-DQTf06oN.js";
|
|
3
3
|
import { n as errorMsg, r as log, s as warnMsg, t as accent } from "./terminal-CxTMfsxZ.js";
|
|
4
|
-
import {
|
|
4
|
+
import { r as resolveUniversalViteConfig } from "./resolve-vite-config-C1KX9CZU.js";
|
|
5
5
|
import path, { dirname, join } from "node:path";
|
|
6
6
|
import { mergeJsonConfig, run } from "../binding/index.js";
|
|
7
7
|
import fs, { existsSync, realpathSync } from "node:fs";
|
package/dist/config/bin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as printHeader, r as log } from "../terminal-CxTMfsxZ.js";
|
|
2
|
-
import {
|
|
2
|
+
import { L as defaultInteractive, _ as hasStagedConfigInViteConfig, h as ensurePreCommitHook, i as updateExistingAgentInstructions, z as promptGitHooks } from "../agent-C8Me6C5u.js";
|
|
3
3
|
import { t as lib_default } from "../lib-BamM40b7.js";
|
|
4
4
|
import { t as renderCliDoc } from "../help-BtkjXtRM.js";
|
|
5
5
|
import { join } from "node:path";
|