2021-03-12 15:23:59 -05:00
|
|
|
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
|
|
|
|
|
2021-04-28 12:41:50 -04:00
|
|
|
use deno_core::include_js_files;
|
|
|
|
use deno_core::Extension;
|
2021-03-12 15:23:59 -05:00
|
|
|
use std::path::PathBuf;
|
|
|
|
|
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-04-30 15:51:48 -04:00
|
|
|
prefix "deno:extensions/console",
|
2021-04-28 18:16:45 -04:00
|
|
|
"01_colors.js",
|
|
|
|
"02_console.js",
|
|
|
|
))
|
|
|
|
.build()
|
2021-03-12 15:23:59 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
pub fn get_declaration() -> PathBuf {
|
|
|
|
PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("lib.deno_console.d.ts")
|
|
|
|
}
|