refactor(extensions): reintroduce builder (#10412)

This commit is contained in:
Aaron O'Mullan 2021-04-29 00:16:45 +02:00 committed by GitHub
parent e63c533154
commit e89295b176
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 141 additions and 112 deletions

View file

@ -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()
}