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

@block-dev/create-config

v0.2.0

Published

🔨 Utilities to create a well linted project

Downloads

2

Readme

🔨 Utilities to create a well linted project

Featrues

  • eslint: standard/airbnb
  • stylelint: standard/recommended
  • prettier
  • commitlint
  • husky
  • lint-staged
  • typescript
  • vue2/vue3: eslint-vue
  • vite

Options

interface {
  name: string // name in package.json
  version?: string // version in package.json
  description?: string // description in package.json

  main?: boolean // if is main project in monorepo

  /* husky & commitlint */
  husky?: boolean // if use husky or not
  lint_staged?: boolean // if use lint-staged or not
  commitlint?: boolean // if use commitlint or not

  /* typescript */
  ts?: boolean // if use typescript or not
  ts_esm?: boolean // if add tsconfig.es.json or not

  /* eslint */
  standard?: boolean // if use eslint-config-standard or not
  airbnb?: boolean // if use eslint-config-airbnb or not

  /* stylelint */
  scss?: boolean // if use stylelint-scss plugin or not
  style_standard?: boolean // if use stylelint-config-standard or not
  style_recommended?: boolean // if use stylelint-config-recommended or not
  rational_order?: boolean // if use stylelint-config-rational-order or not

  /* eslint-vue */
  vue2_essential?: boolean // if use eslint-plugin-vue or not
  vue3_essential?: boolean
  vue2_strongly_recommended?: boolean
  vue3_strongly_recommended?: boolean
  vue2_recommended?: boolean
  vue3_recommended?: boolean

  /* vite */
  vite?: boolean

  /* repository */
  license?: string // license in package.json
  repository?: string // repository in package.json
  author?: string // author in package.json
  homepage?: string // homepage in package.json

  /* custom */
  custom_scripts?: Record<string, string> // append fields in scripts filed
  custom_dependencies?: Record<string, string> // append fields in dependencies filed
  custom_dev_dependencies?: Record<string, string> // append fields in devDependencies filed
  custom_package_json_fields: Record<string, any> // overwrite fields in package.json
}

Usage

Config in this package is created by following code:

import { genConfigFiles } from './src';

genConfigFiles({
  name: '@block-dev/create-config',
  description: '🔨 Utilities to create a well linted project',
  license: 'MIT',
  author: 'OrekiSH <[email protected]> (https://github.com/OrekiSH)',
  repository: 'https://github.com/OrekiSH/block-dev',
  ts: true,
  ts_esm: true,
  editorconfig: false,
  gitignore: false,
  custom_dev_dependencies: {
    'npm-run-all': '^4.1.5',
  },
  custom_scripts: {
    build: 'npm-run-all --parallel build:*',
    'build:es': 'tsc --p ./tsconfig.es.json',
    'build:cjs': 'tsc',
    'lint:js': 'eslint . --ignore-path .eslintignore',
  },
});