feat(frameworks): add Drupal 8/9/10/11 support (#271)
Detects Drupal projects via composer.json drupal/* deps; extracts routes from *.routing.yml (route nodes + references edges to controllers/forms/entity handlers) and Drupal hook implementations from .module/.install/.theme/.inc. Adds yaml/twig as file-level languages and excludes core/contrib by default. Resolves #268.
This commit is contained in:
@@ -87,6 +87,8 @@ export const LANGUAGES = [
|
||||
'scala',
|
||||
'lua',
|
||||
'luau',
|
||||
'yaml',
|
||||
'twig',
|
||||
'unknown',
|
||||
] as const;
|
||||
|
||||
@@ -522,6 +524,15 @@ export const DEFAULT_CONFIG: CodeGraphConfig = {
|
||||
'**/*.cs',
|
||||
// PHP
|
||||
'**/*.php',
|
||||
// Drupal-specific PHP extensions
|
||||
'**/*.module',
|
||||
'**/*.install',
|
||||
'**/*.theme',
|
||||
'**/*.inc',
|
||||
// Drupal routing YAML
|
||||
'**/*.routing.yml',
|
||||
// Twig templates
|
||||
'**/*.twig',
|
||||
// Ruby
|
||||
'**/*.rb',
|
||||
// Swift
|
||||
@@ -667,6 +678,11 @@ export const DEFAULT_CONFIG: CodeGraphConfig = {
|
||||
'**/storage/framework/**',
|
||||
'**/bootstrap/cache/**',
|
||||
|
||||
// Drupal - core and contrib are rarely customised; index only custom code
|
||||
'**/web/core/**',
|
||||
'**/web/modules/contrib/**',
|
||||
'**/web/themes/contrib/**',
|
||||
|
||||
// Ruby
|
||||
'**/.bundle/**',
|
||||
'**/tmp/cache/**',
|
||||
|
||||
Reference in New Issue
Block a user