0.6.8 • Published 4 months ago
monoman v0.6.8
monoman 
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!`
},
},
{
include = 'pnpm-lock.yaml',
exclude: ['exclude/pnpm-lock.yaml'],
type: 'yaml',
contents(data: Record<string, string>) {
data.lockfileVersion = '9.0'
return data
},
},
])
See an example for more details.
Presets
noDuplicatedDeps
Make all dependencies in all package.json
unique.
function noDuplicatedDeps({
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[]
} = {})
noDuplicatedPnpmLockfile
function noDuplicatedPnpmLockfile({
include = 'pnpm-lock.yaml',
exclude,
deps = [],
}: {
/** Include files */
include?: Arrayable<string>
/** Exclude files */
exclude?: Arrayable<string>
/** Deps to check */
deps?: Arrayable<string>
} = {})
Sponsors
License
0.6.7
4 months ago
0.6.6
4 months ago
0.6.8
4 months ago
0.6.3
5 months ago
0.6.2
6 months ago
0.6.5
5 months ago
0.6.4
5 months ago
0.6.1
6 months ago
0.6.0
7 months ago
0.5.4
10 months ago
0.5.3
10 months ago
0.5.5
10 months ago
0.5.0
10 months ago
0.5.2
10 months ago
0.5.1
10 months ago
0.4.3
12 months ago
0.4.2
2 years ago
0.3.0
2 years ago
0.2.0
2 years ago
0.4.1
2 years ago
0.4.0
2 years ago
0.1.2
2 years ago
0.1.1
2 years ago
0.1.0
2 years ago
0.0.0
2 years ago