mirror of
https://github.com/google-gemini/gemini-cli
synced 2026-04-21 13:37:17 +00:00
fix(extensions): fix bundling for examples (#25542)
This commit is contained in:
parent
ac9025e9fc
commit
2b6dab6136
3 changed files with 19 additions and 0 deletions
1
package-lock.json
generated
1
package-lock.json
generated
|
|
@ -62,6 +62,7 @@
|
||||||
"prettier": "^3.5.3",
|
"prettier": "^3.5.3",
|
||||||
"react-devtools-core": "^6.1.2",
|
"react-devtools-core": "^6.1.2",
|
||||||
"react-dom": "^19.2.0",
|
"react-dom": "^19.2.0",
|
||||||
|
"read-package-up": "^11.0.0",
|
||||||
"semver": "^7.7.2",
|
"semver": "^7.7.2",
|
||||||
"strip-ansi": "^7.1.2",
|
"strip-ansi": "^7.1.2",
|
||||||
"ts-prune": "^0.10.3",
|
"ts-prune": "^0.10.3",
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,7 @@
|
||||||
],
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@agentclientprotocol/sdk": "^0.16.1",
|
"@agentclientprotocol/sdk": "^0.16.1",
|
||||||
|
"read-package-up": "^11.0.0",
|
||||||
"@octokit/rest": "^22.0.0",
|
"@octokit/rest": "^22.0.0",
|
||||||
"@types/marked": "^5.0.2",
|
"@types/marked": "^5.0.2",
|
||||||
"@types/mime-types": "^3.0.1",
|
"@types/mime-types": "^3.0.1",
|
||||||
|
|
|
||||||
|
|
@ -120,4 +120,21 @@ if (existsSync(ripgrepVendorSrc)) {
|
||||||
console.log('Copied ripgrep vendor binaries to bundle/vendor/ripgrep/');
|
console.log('Copied ripgrep vendor binaries to bundle/vendor/ripgrep/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 8. Copy Extension Examples
|
||||||
|
const extensionExamplesSrc = join(
|
||||||
|
root,
|
||||||
|
'packages/cli/src/commands/extensions/examples',
|
||||||
|
);
|
||||||
|
const extensionExamplesDest = join(bundleDir, 'examples');
|
||||||
|
const EXCLUDED_EXAMPLE_DIRS = ['node_modules', 'dist'];
|
||||||
|
|
||||||
|
if (existsSync(extensionExamplesSrc)) {
|
||||||
|
cpSync(extensionExamplesSrc, extensionExamplesDest, {
|
||||||
|
recursive: true,
|
||||||
|
dereference: true,
|
||||||
|
filter: (src) => !EXCLUDED_EXAMPLE_DIRS.some((dir) => src.includes(dir)),
|
||||||
|
});
|
||||||
|
console.log('Copied extension examples to bundle/examples/');
|
||||||
|
}
|
||||||
|
|
||||||
console.log('Assets copied to bundle/');
|
console.log('Assets copied to bundle/');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue