npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@dovenv/core

v0.0.6

Published

Quickly and easily set up your environment for your code projects

Downloads

53

Readme

dovenv

Web About Us Donate Github Twitter Instagram Medium

Quickly and easily set up your environment for your code projects

Table of contents

🔑 Installation

npm install dovenv
# or pnpm
pnpm add dovenv
# or yarn
yarn add dovenv

Api documentation

Classes

Dovenv

Instance Dovenv.

This is the "dovenv" class that builds the command line interface.

It is similar to the cli tool but for use in js|ts projects.

Provides tools for managing configurations, constants, and path transformations etc. Supports custom configurations and predefined commands. Features:

  • Validate files or directories with custom rules.
  • Manage workspace constants efficiently.
  • Transform paths with configurable patterns.
  • Extend or override default behaviors with custom configurations.

See

https://dovenv.pigeonposse.com/guide/core

Example
// Create an instance with custom configurations
const dovenv = new Dovenv({
  config: {
    check: {
      pkg: { include: ['src/**'], ... }
    },
  }
});

// Run a predefined action
await dovenv.run(['check', '-k', 'pkg']);
Constructors
new Dovenv()
new Dovenv(params?: Params): Dovenv

Creates a new Dovenv instance.

Parameters

| Parameter | Type | Description | | ------ | ------ | ------ | | params? | Params | Optional initialization parameters. |

Returns

Dovenv

Methods
run()
run(args: string[]): Promise<void>

Runs the build process with the given arguments.

Parameters

| Parameter | Type | Description | | ------ | ------ | ------ | | args | string[] | Arguments to pass to the run process. |

Returns

Promise<void>

Example
const dovenv = new Dovenv({
  config: {
    check: {
      pkg: {...}
    },
    ...
  }
})
await dovenv.run(['check', '-k', 'pkg'])
Properties

| Property | Type | | ------ | ------ | | config | undefined | Config |

Functions

defineConfig()

function defineConfig(...config: (Config | Config[])[]): Config

Defines and returns the given configuration object.

Parameters

| Parameter | Type | Description | | ------ | ------ | ------ | | ...config | (Config | Config[])[] | The configuration object to define. |

Returns

Config

  • The defined configuration object.
See

https://dovenv.pigeonposse.com/guide/core


Examples
// Example 1: A single configuration object
export default defineConfig(config1);
// Example 2: Multiple configurations as arguments
export default defineConfig(config1, config2);
// Example 3: An array of configurations
export default defineConfig([config1, config2]);

run()

function run(args: string[]): Promise<void>

Runs the build process with the given arguments.

Parameters

| Parameter | Type | Description | | ------ | ------ | ------ | | args | string[] | Arguments to pass to the build process. |

Returns

Promise<void>

Example
import { run } from '@dovenv/core'

await run(['-c', 'my/config.js', 'check'])

Type Aliases

Config

type Config: {
  check: CheckConfig;
  const: ConstConfig;
  custom: CustomConfig;
  desc: string;
  name: string;
  template: TemplateConfig;
  transform: TransformConfig;
};
Type declaration

| Name | Type | Description | | ------ | ------ | ------ | | check? | CheckConfig | Configuration for the check command | | const? | ConstConfig | Configuration for set the constants used in templates | | custom? | CustomConfig | Configuration for create custom commands | | desc? | string | Description of the project | | name? | string | Name of the project | | template? | TemplateConfig | Configuration for the template command | | transform? | TransformConfig | Configuration for the transform command |


Params

type Params: {
  config: Config;
};
Type declaration

| Name | Type | Description | | ------ | ------ | ------ | | config? | Config | Configuration for dovenv See https://dovenv.pigeonposse.com/guide/core/config |


👨‍💻 Development

dovenv is an open-source project and its development is open to anyone who wants to participate.

Issues Pull requests Read more

☕ Donate

Help us to develop more interesting things.

Donate

📜 License

This software is licensed with GPL-3.0.

Read more

🐦 About us

PigeonPosse is a ✨ code development collective ✨ focused on creating practical and interesting tools that help developers and users enjoy a more agile and comfortable experience. Our projects cover various programming sectors and we do not have a thematic limitation in terms of projects.

More


Web About Us Donate Github Twitter Instagram Medium