0.4.2 • Published 8 months ago

monoman v0.4.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

monoman npm

Unit Test

Manage monorepo common files.

Install

npm i monoman

Usage

pnpm monoman [-c | --check | -w | --write]
// monoman.config.[ts,js]
import { defineConfig } from 'monoman'

export default defineConfig([
  {
    // Globs to match files
    include: ['**/package.json'],
    exclude: ['exclude/package.json'],
    type: 'json',
    contents(data: Record<string, string>) {
      data.name = 'monoman'
      return data
    },
  },
  {
    include: ['**/package.json'],
    exclude: ['exclude/package.json'],
    type: 'text',
    contents(text) {
      return `${text} hello monoman!`
    },
  },
])

See an example for more details.

Presets

dedupeDeps

Make all dependencies in all package.json unique.

function dedupeDeps({
  include = 'packages/*/package.json',
  exclude,
  distinguishType = false,
  types = ['dependencies', 'devDependencies'],
  ignoreProtocols = ['file', 'link', 'workspace'],
}: {
  include?: Arrayable<string>
  exclude?: Arrayable<string>
  distinguishType?: boolean
  types?: string[]
  ignoreProtocols?: string[]
} = {})

Sponsors

License

MIT License © 2023 三咲智子

0.4.2

8 months ago

0.3.0

9 months ago

0.2.0

9 months ago

0.4.1

9 months ago

0.4.0

9 months ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.0

1 year ago