mirror of
https://github.com/ChromeDevTools/chrome-devtools-mcp.git
synced 2026-09-29 16:58:10 +08:00
build: move devtools into third_party (#2558)
This commit is contained in:
@@ -28,8 +28,10 @@ function main(): void {
|
||||
if (fs.existsSync(devtoolsTs)) {
|
||||
fs.unlinkSync(devtoolsTs);
|
||||
}
|
||||
const devtoolsThirdPartyPath = 'devtools-frontend/front_end/third_party';
|
||||
const devtoolsFrontEndCorePath = 'devtools-frontend/front_end/core';
|
||||
const devtoolsThirdPartyPath =
|
||||
'third_party/devtools-frontend/front_end/third_party';
|
||||
const devtoolsFrontEndCorePath =
|
||||
'third_party/devtools-frontend/front_end/core';
|
||||
|
||||
// Create i18n mock
|
||||
const i18nDir = path.join(BUILD_DIR, devtoolsFrontEndCorePath, 'i18n');
|
||||
@@ -70,6 +72,7 @@ export const css = { cssLanguage: { parser: { parse: () => ({ topNode: { getChil
|
||||
// Create skills mocks
|
||||
const skillsDir = path.join(
|
||||
BUILD_DIR,
|
||||
'third_party',
|
||||
'devtools-frontend',
|
||||
'front_end',
|
||||
'models',
|
||||
@@ -156,6 +159,7 @@ export const ExperimentName = {
|
||||
);
|
||||
const codemirrorSrcDir = path.join(
|
||||
process.cwd(),
|
||||
'third_party',
|
||||
'devtools-frontend',
|
||||
'front_end',
|
||||
'third_party',
|
||||
@@ -179,7 +183,7 @@ export const ExperimentName = {
|
||||
|
||||
function copyDevToolsDescriptionFiles(): void {
|
||||
const devtoolsIssuesDescriptionPath =
|
||||
'devtools-frontend/front_end/models/issues_manager/descriptions';
|
||||
'third_party/devtools-frontend/front_end/models/issues_manager/descriptions';
|
||||
const sourceDir = path.join(process.cwd(), devtoolsIssuesDescriptionPath);
|
||||
const destDir = path.join(
|
||||
BUILD_DIR,
|
||||
|
||||
+6
-2
@@ -39,7 +39,11 @@ function removeConflictingGlobalDeclaration(): void {
|
||||
}
|
||||
|
||||
function ensureSubmodule(): void {
|
||||
const devtoolsFrontendDir = resolve(projectRoot, 'devtools-frontend');
|
||||
const devtoolsFrontendDir = resolve(
|
||||
projectRoot,
|
||||
'third_party',
|
||||
'devtools-frontend',
|
||||
);
|
||||
const mcpEntry = resolve(devtoolsFrontendDir, 'mcp', 'mcp.ts');
|
||||
|
||||
if (existsSync(mcpEntry)) {
|
||||
@@ -61,7 +65,7 @@ function ensureSubmodule(): void {
|
||||
console.log('Fetching devtools-frontend...');
|
||||
try {
|
||||
execSync(
|
||||
'git clone --depth 1 https://github.com/ChromeDevTools/devtools-frontend.git devtools-frontend',
|
||||
'git clone --depth 1 https://github.com/ChromeDevTools/devtools-frontend.git third_party/devtools-frontend',
|
||||
{
|
||||
cwd: projectRoot,
|
||||
stdio: 'inherit',
|
||||
|
||||
Reference in New Issue
Block a user