0.0.5 • Published 3 years ago
@krulod/sorcerer v0.0.5
@krulod/sorcerer
An opinionated utility for building and testing packages.
Usage
Install:
$ pnpm add -D @krulod/sorcererSetup tsconfig.json:
{
"compilerOptions": {
"strict": true,
"target": "esnext",
"module": "esnext",
"lib": ["esnext", "dom"],
"moduleResolution": "node",
"experimentalDecorators": true,
"declaration": true,
"outDir": "dist"
},
"files": ["./index.ts"]
}Write some modules and export them from index.ts:
// index.ts
export * from './src/sum'Create a distribution directory dist:
$ pnpm sorcerer buildWrite some tests:
// test/sum.test.ts
import {test, assert} from '@krulod/sorcerer'
import {sum} from '../src/sum.ts'
test('sum', {
'natural numbers': () => {
assert.is(sum(1, 2), 3)
},
})Run tests:
$ pnpm sorcerer testIncrementally rebuild and rerun tests whenever files change:
$ pnpm sorcerer devLimitations
- neither extensible nor configurable, probably won't suit your needs
- tests are only ran in Node
Used in
- so far nowhere
License
GNU Affero General Public License v3.0 or later