open-index/open-npm huggingface dataset:
npm package: @pkkummermo/pkk-scripts
Description: Boostrapper for projects
Author: Per Kristian Kummermo
Latest version: 0.1.11

# pkk-scripts

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![data-mapper-chain](https://img.shields.io/npm/v/@pkkummermo/pkk-scripts.svg)](https://www.npmjs.com/package/@pkkummermo/pkk-scripts)

A package for bootstrapping and simplifying startup of private projects

## Why

Highly inspired by Kent C. Dodds [kcd-scripts](https://github.com/kentcdodds/kcd-scripts) and [his article](https://blog.kentcdodds.com/automation-without-config-412ab5e47229) I created pkk-scripts. It's meant to simplify creating new projects and standardize tooling versions and help keep everything up to date.

## Install

```
npm i -D @pkkummermo/pkk-scripts
```

## Usage

```bash
pkk-scripts --help

Usage: pkk-scripts [options] [command]

pkk-scripts - bootstrapper for projects

Options:
  -V, --version     output the version number
  -h, --help        output usage information

Commands:
  test|t            Runs project tests
  lint|l [options]  Lints project files.
  server|s          Starts development server
  build|b           Builds current project
```

Add configurations according to your needs in package.json.

Ex (in `package.json` script attribute):

```json
{
    "scripts": {
        "build": "pkk-scripts b",
        "start": "pkk-scripts s",
        "test:unit": "pkk-scripts t",
        "test:lint": "pkk-scripts l"
    }
}
```

These will trigger `pkk-scripts` which will in turn automatically detect project configurations and run the according action.

## Configuration

The CLI comes bundles with default configurations, but will eat configurations available in the project folder it is run in. This includes (for now):

-   TSLint (tslint.json)
-   ESLint (.eslintignore, .eslintrc.js, .eslintrc.json)
npm package: @pkl-community/pkl-darwin-arm64
Description: These packages ship the [Pkl](https://pkl-lang.org/) CLI as an NPM module, allowing it to be run with `npx` and controlled programmatically as a library.
Author: Pkl community developers
Latest version: 0.30.2

# Pkl Node Packages

These packages ship the [Pkl](https://pkl-lang.org/) CLI as an NPM module, allowing it to be run with
`npx` and controlled programmatically as a library.
npm package: @pkl-community/pkl-darwin-x64
Description: These packages ship the [Pkl](https://pkl-lang.org/) CLI as an NPM module, allowing it to be run with `npx` and controlled programmatically as a library.
Author: Pkl community developers
Latest version: 0.30.2

# Pkl Node Packages

These packages ship the [Pkl](https://pkl-lang.org/) CLI as an NPM module, allowing it to be run with
`npx` and controlled programmatically as a library.
npm package: @pkl-community/pkl-eval
Description: A library wrapper for the Pkl CLI
Author: Pkl community Developers
Latest version: 0.0.3

# pkl-eval

A very simple library that wraps the `pkl eval` command to interpret a fixed string as a Pkl module.
A stopgap until we have Typescript bindings.

Supported flags:
- format
- allowed-modules
- allowed-resources
- timeout
- expression

## Example

The simple example from the https://pkl-lang.org/ homepage:

```ts
import {evaluate} from "@pkl-community/pkl-eval"

const bird = JSON.parse(await evaluate(`
  name = "Swallow"
  
  job {
    title = "Sr. Nest Maker"
    company = "Nests R Us"
    yearsOfExperience = 2
  }
`, {format: "json"}));

console.log(bird);
```

Outputs:

```js
{
  name: "Swallow",
  job: {
    title: "Sr. Nest Maker",
    company: "Nests R Us",
    yearsOfExperience: 2
  }
}
```

A more complex example (careful with nested escaping!):

```ts
import {evaluate} from "@pkl-community/pkl-eval"

const output = JSON.parse(await evaluate(`
  class Bird {
    name: String
    function greet(bird: Bird): String = "Hello, \\(bird.name)!" 
  }
  
  function greetPigeon(bird: Bird): String = bird.greet(pigeon) 
  
  pigeon: Bird = new {
    name = "Pigeon"
  }
  parrot: Bird = new {
    name = "Parrot"
  }
  
  greeting1 = pigeon.greet(parrot) 
  greeting2 = greetPigeon(parrot)
`, {format: "json"}));

console.log(output);
```

Outputs:

```js
{
  pigeon: { name: "Pigeon" },
  parrot: { name: "Parrot" },
  greeting1: "Hello, Parrot!",
  greeting2: "Hello, Pigeon!"
}
```
npm package: @pkl-community/pkl-linux-arm64
Description: These packages ship the [Pkl](https://pkl-lang.org/) CLI as an NPM module, allowing it to be run with `npx` and controlled programmatically as a library.
Author: Pkl community developers
Latest version: 0.30.2

# Pkl Node Packages

These packages ship the [Pkl](https://pkl-lang.org/) CLI as an NPM module, allowing it to be run with
`npx` and controlled programmatically as a library.
npm package: @pkl-community/pkl-linux-x64
Description: These packages ship the [Pkl](https://pkl-lang.org/) CLI as an NPM module, allowing it to be run with `npx` and controlled programmatically as a library.
Author: Pkl community developers
Latest version: 0.30.2

# Pkl Node Packages

These packages ship the [Pkl](https://pkl-lang.org/) CLI as an NPM module, allowing it to be run with
`npx` and controlled programmatically as a library.