He’d been called in as a freelance front-end architect. The client, a fast-growing tech magazine, complained that their site felt “sluggish” and that their designers were “fighting the theme.” Luca had seen this before. The previous developer had simply ported a Drupal 7 theme forward, layering patch upon patch. The styles.css file was 8,000 lines of spaghetti. The JavaScript was a jQuery meatball. And the template files ( html.twig , page.html.twig ) were littered with deprecated variables.
Luca closed his laptop, poured one last espresso, and looked out the window. Another legacy system, modernized. Another team, liberated. luca lusso modernizing drupal 10 theme development
global-scripts: js: dist/scripts/index.js: preprocess: true, minified: true dependencies: - core/drupal - core/once No more $(document).ready() . He used the new once() library to prevent rebinding and wrote vanilla JavaScript: He’d been called in as a freelance front-end architect
His mission was clear: modernize it without breaking the live site for more than a weekend. The styles
On Sunday night, Luca ran the final build. He used Drupal 10’s new auto-setup CLI to spin up a test environment, ran phpunit on his custom theme settings, and pushed the changes.