From e89295b176b4f494d19b547b6b4d7c98d0cf1da1 Mon Sep 17 00:00:00 2001 From: Aaron O'Mullan Date: Thu, 29 Apr 2021 00:16:45 +0200 Subject: refactor(extensions): reintroduce builder (#10412) --- op_crates/webidl/lib.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'op_crates/webidl/lib.rs') diff --git a/op_crates/webidl/lib.rs b/op_crates/webidl/lib.rs index a1a404dbd..c73c60bab 100644 --- a/op_crates/webidl/lib.rs +++ b/op_crates/webidl/lib.rs @@ -1,11 +1,14 @@ // Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. +use deno_core::include_js_files; use deno_core::Extension; /// Load and execute the javascript code. pub fn init() -> Extension { - Extension::pure_js(vec![( - "deno:op_crates/webidl/00_webidl.js", - include_str!("00_webidl.js"), - )]) + Extension::builder() + .js(include_js_files!( + prefix "deno:op_crates/webidl", + "00_webidl.js", + )) + .build() } -- cgit v1.2.3