2023-01-02 16:00:42 -05:00
|
|
|
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
2021-03-12 15:23:59 -05:00
|
|
|
|
2021-04-28 12:41:50 -04:00
|
|
|
use deno_core::include_js_files;
|
|
|
|
use deno_core::Extension;
|
2022-03-16 20:25:44 -04:00
|
|
|
use std::path::PathBuf;
|
2021-03-12 15:23:59 -05:00
|
|
|
|
2021-04-28 12:41:50 -04:00
|
|
|
pub fn init() -> Extension {
|
2023-01-08 17:48:46 -05:00
|
|
|
Extension::builder(env!("CARGO_PKG_NAME"))
|
2023-02-07 14:22:46 -05:00
|
|
|
.esm(include_js_files!(
|
2023-02-05 11:49:20 -05:00
|
|
|
prefix "internal:ext/console",
|
2021-04-28 18:16:45 -04:00
|
|
|
"01_colors.js",
|
|
|
|
"02_console.js",
|
|
|
|
))
|
|
|
|
.build()
|
2021-03-12 15:23:59 -05:00
|
|
|
}
|
2022-03-16 20:25:44 -04:00
|
|
|
|
|
|
|
pub fn get_declaration() -> PathBuf {
|
|
|
|
PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("lib.deno_console.d.ts")
|
|
|
|
}
|