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

@actions-kit/dev

v0.2.0

Published

Development tool library of Actions Kit

Downloads

4

Readme

Actions Kit - Dev

npm version build status

A development tool library for Actions Kit, an additional toolkit for developing GitHub Actions.

This package simplifies the development configuration of other packages in the Actions Kit and can also be used in other projects. It uses the following stacks for project development:

  • TypeScript: The primary language for project development.
  • Prettier: A code formatter for TypeScript, JavaScript, and JSON source files.
  • ESLint: A linter for TypeScript and JavaScript code.
  • Jest: A testing framework for TypeScript and JavaScript code.

This package offers two main features:

  • A dev tool that serves as the primary entry point for executing various commands.
  • A default configuration along with the flexibility to modify it according to the specific requirements of a project.

Installation

Run the following commmand to install the @actions-kit/dev package as a dev dependency:

npm install @actions-kit/dev --save-dev

Usage

Using the Dev Tool

Use the dev tool by running the following commands:

  • dev build: Compiles source files from TypeScript to JavaScript.
  • dev clean: Cleans the build output directory.
  • dev format: Formats the source files using Prettier.
  • dev lint: Lints the source files using ESLint.
  • dev test: Runs tests using Jest.

The dev tool can also be invoked as a script in the package.json file to simplify build commands during project development:

{
  ...
  "scripts": {
    "build": "dev build",
    "clean": "dev clean",
    "format": "dev format",
    "lint": "dev lint",
    "test": "dev test"
  },
  ...
}

Configuring TypeScript

Configure TypeScript by extending the tsconfig.json from @actions-kit/dev/tsconfig.json:

{
  "extends": "@actions-kit/dev/tsconfig.json",
  "compilerOptions": {
    "outDir": "lib"
  },
  "include": ["src"],
  ...
}

Make sure to set the compilerOptions.outDir and include properties correctly according to the project's requirements. For more information on further modifications to the tsconfig.json file, refer to the TSConfig reference.

Configuring ESLint

Set up a default ESLint configuration by importing createEslintConfig from @actions-kit/dev in the .eslintrc.js file:

const dev = require("@actions-kit/dev");

module.exports = dev.createEslintConfig();

To modify the default configuration, pass an object to the createEslintConfig function:

module.exports = dev.createEslintConfig({ env: { browser: true } });

Alternatively, pass a function to the createEslintConfig to further modify the default configuration:

module.exports = dev.createEslintConfig((config) => {
  config.rules["no-shadow"] = 2;
  return config;
});

For more information on configuring ESLint, refer to the ESLint configuration documentation.

Configuring Jest

Set up a default Jest configuration by importing createJestConfig from @actions-kit/dev in the jest.config.ts file:

import { createJestConfig } from "@actions-kit/dev";

export default createJestConfig();

To modify the default configuration, pass an object to the createJestConfig function:

export default createJestConfig({ verbose: false });

Alternatively, pass a function to the createJestConfig to further modify the default configuration:

export default createJestConfig((config) => {
  config.testMatch?.push("**/*.test.js");
  return config;
});

For more information on configuring Jest, refer to the Jest configuration documentation.

License

This project is licensed under the terms of the MIT License.

Copyright © 2023 Alfi Maulana