summaryrefslogtreecommitdiff
path: root/op_crates/webidl/lib.rs
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@gmail.com>2021-04-29 00:16:45 +0200
committerGitHub <noreply@github.com>2021-04-28 18:16:45 -0400
commite89295b176b4f494d19b547b6b4d7c98d0cf1da1 (patch)
treeae2f043d8a883b6f6f754c057b8dfe678b3c7944 /op_crates/webidl/lib.rs
parente63c53315450ed305752566f4c3ad2bb76c8b8a3 (diff)
refactor(extensions): reintroduce builder (#10412)
Diffstat (limited to 'op_crates/webidl/lib.rs')
-rw-r--r--op_crates/webidl/lib.rs11
1 files changed, 7 insertions, 4 deletions
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()
}