1.2.3 • Published 12 months ago
@nartallax/ts-build-utils v1.2.3
@nartallax/ts-build-utils
A collection of utility scripts that help with build process of TypeScript projects.
Powered by ESBuild, @chialab/esbuild-html-plugin, dts-bundle-generator and more.
Install
npm install --save-dev @nartallax/ts-build-utilsUse
// Main entrypoint of this package is buildUtils function:
import {buildUtils} from "@nartallax/ts-build-utils"
// This function accepts parameters describing your project
// and creates a bunch of other functions
// (not everything listed here, be sure to check typedefs):
const {
clear,
build,
runTests,
copyToTarget,
npm,
serve
} = buildUtils({
buildOptions: {
entryPoints: ["./src/index.html"]
}
})
// buildUtils() assumes a lot of stuff,
// like that project has tsconfig.json,
// and that tsconfig.json has rootDir set;
// this may not always be true, but that's checked,
// so if something is not there - the script will tell you.
// also override options are there for almost everything;
// you can pass various options to most util functions.
// after acquiring the utils, you may use them to describe your build process:
await clear()
switch(process.argv[2]){
case "dev": {
await serve()
} break
case "test": {
await runTests({nameFilter: process.argv[3]})
} break
case "publish": {
await build()
await copyToTarget("README.md", "LICENSE", "package.json")
await npm.publish({dryRun: true})
}
}1.2.0
1 year ago
1.1.1
1 year ago
1.1.0
1 year ago
1.1.9
1 year ago
1.1.8
1 year ago
1.1.7
1 year ago
1.1.6
1 year ago
1.1.5
1 year ago
1.2.3
12 months ago
1.1.4
1 year ago
1.2.2
12 months ago
1.1.3
1 year ago
1.2.1
12 months ago
1.1.2
1 year ago
1.1.12
1 year ago
1.1.11
1 year ago
1.1.10
1 year ago
1.1.14
1 year ago
1.1.13
1 year ago
1.0.15
1 year ago
1.0.14
1 year ago
1.0.9
1 year ago
1.0.8
1 year ago
1.0.7
1 year ago
1.0.11
1 year ago
1.0.10
1 year ago
1.0.13
1 year ago
1.0.12
1 year ago
1.0.6
1 year ago
1.0.5
1 year ago
1.0.4
1 year ago
1.0.3
1 year ago
1.0.2
1 year ago
1.0.1
1 year ago
1.0.0
1 year ago