Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/cli/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/npm
/artifacts
/LICENSE
/LICENSE.md
/skills/vite-plus/docs
15 changes: 4 additions & 11 deletions packages/cli/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* 4. syncCorePackageExports() - Creates shim files to re-export from @voidzero-dev/vite-plus-core
* 5. syncTestPackageExports() - Creates shim files to re-export from @voidzero-dev/vite-plus-test
* 6. copySkillDocs() - Copies docs into skills/vite-plus/docs for runtime MCP access
* 7. syncReadmeFromRoot()/syncLicenseFromRoot() - Keeps package docs/license in sync
* 7. syncReadmeFromRoot() - Keeps package README in sync
*
* The sync functions allow this package to be a drop-in replacement for 'vite' by
* re-exporting all the same subpaths (./client, ./types/*, etc.) while delegating
Expand Down Expand Up @@ -64,13 +64,13 @@ if (!skipTs) {
generateLicenseFile({
title: 'Vite-Plus CLI license',
packageName: 'Vite-Plus',
outputPath: join(projectDir, 'LICENSE.md'),
outputPath: join(projectDir, 'LICENSE'),
coreLicensePath: join(projectDir, '..', '..', 'LICENSE'),
bundledPaths: [join(projectDir, 'dist', 'global')],
resolveFrom: [projectDir],
});
if (!existsSync(join(projectDir, 'LICENSE.md'))) {
throw new Error('LICENSE.md was not generated during build');
if (!existsSync(join(projectDir, 'LICENSE'))) {
throw new Error('LICENSE was not generated during build');
}
}
// Build native first - TypeScript may depend on the generated binding types
Expand All @@ -83,7 +83,6 @@ if (!skipTs) {
}
await copySkillDocs();
await syncReadmeFromRoot();
await syncLicenseFromRoot();

async function buildNapiBinding() {
const buildCommand = createBuildCommand(napiArgs);
Expand Down Expand Up @@ -482,12 +481,6 @@ async function syncReadmeFromRoot() {
}
}

async function syncLicenseFromRoot() {
const rootLicensePath = join(projectDir, '..', '..', 'LICENSE');
const packageLicensePath = join(projectDir, 'LICENSE');
await copyFile(rootLicensePath, packageLicensePath);
}

function splitReadme(content: string, label: string) {
const match = /^---\s*$/m.exec(content);
if (!match || match.index === undefined) {
Expand Down
Loading