pkg-tools

A build toolchain for TypeScript Logo projects

Tools are
standalone, install only what you need
configured in typescript
wrappers around best-of-breed tools
usable as a CLI or programmatically

> Getting started

Starting fresh 🫧

npm create @pkg-tools/pkg

Updating an existing 📦

1. Install
npm install -D \
@pkg-tools/config \
@pkg-tools/build \
@pkg-tools/clean \
@pkg-tools/format \
@pkg-tools/lint \
;
echo "const { getConfig } = require("@pkg-tools/format/config");
module.exports = getConfig();" > .prettierrc.cjs;
echo "const { getConfig } = require("@pkg-tools/lint/config");
module.exports = getConfig();" > .eslintrc.cjs;
2. Use CLIs
npm pkg set \
scripts.build="build" \
scripts.clean="clean" \
scripts.dev="build -w" \
scripts.format="format" \
scripts.lint="lint" \
;
3. Configure
import {
defineConfig
} from "@pkg-tools/config";
export default defineConfig({
build: {
entries: ["src/index"],
sourcemap: true,
},
clean: {
directory: "./dist",
},
format: {
semi: true,
singleQuote: true,
},
lint: {
rules: {
"no-unused-vars": 0,
},
},
});