This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

ts-blocks

0.11.0 • Public • Published

ts-blocks

Well documented, tested, self owned building blocks for TypeScript applications.

npx ts-blocks init

Check out our docs.

What is ts-blocks?

ts-blocks is a collection of well documented, and tested utility functions and types that can be easily dropped into your project.

They have 0 dependencies and allow you to modify the code to your own requirements. This allows you to own the code without having to write it yourself every time.

Setup

Run the init command to setup the blocks.json file.

npx ts-blocks init

Adding Blocks

Single

npx ts-blocks add result

Multiple

npx ts-blocks add result array-sum

Blocks

All blocks can be found under the ./blocks directory or you can view the typedoc generated documentation here.

Tests

Each block is tested using vitest. By default we add these tests to your project when you add a block. To disable this behavior configure includeTests in your blocks.json file.

[!NOTE] If vitest isn't already installed in your project we will attempt to install it for you.

{
	"$schema": "https://unpkg.com/ts-blocks@0.1.0/schema.json",
	// ...
	"includeTests": false // disable including tests
}

Testing CLI Command

npx ts-blocks test

If you don't want to include the tests in your project source or simply want to keep your code up to date with the latest test cases you can run tests through the CLI.

Test single

ts-blocks test result

Test multiple

ts-blocks test result array-sum

Package Sidebar

Install

npm i ts-blocks

Weekly Downloads

35

Version

0.11.0

License

MIT

Unpacked Size

196 kB

Total Files

40

Last publish

Collaborators

  • iedan.