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 {
|
2021-04-28 18:16:45 -04:00
|
|
|
Extension::builder()
|
|
|
|
.js(include_js_files!(
|
2021-08-11 06:27:05 -04:00
|
|
|
prefix "deno: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")
|
|
|
|
}
|