Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/powar/example/deps.ts>powar.CommonApi

A simple but powerful TypeScript-based dot-file manager.
Go to Latest
interface powar.CommonApi
import { type powar } from "https://deno.land/x/powar@1.0.3/example/deps.ts";
const { CommonApi } = powar;

The main powar-ts API which is available to modules and the global configuration.

Properties

info: (msg: string) => void

Log a message at the info level.

warn: (msg: string) => void

Log a message at the warn level.

makeDir: (paths: string) => Promise<void>

Make a directory at the given path, including any parent directories.

install: (entries: Entries) => Promise<void>

Copy files from the given source paths to the given destination paths.

installContents: (contents: Contents) => Promise<void>

Write the given contents to the given destination paths.

exec: (command: string, opts?: ExecOpts) => Promise<Output>

Execute the given command in the shell.

read: (filename: string) => Promise<string>

Read the contents of the given file.