# hwrld

> Can log "hello world" and "goodbye world" to the console!

Latest version **2.2.1** (published 2023-09-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install hwrld
pnpm add hwrld
yarn add hwrld
bun add hwrld
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.2.1 |
| Published | 2023-09-08 |
| First published | 2017-06-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 98 |
| Author | Daniel Niederberger |
| Maintainers | bersling |
| Keywords | demo, typescript, library, hello world |

## Links

- npm: https://www.npmjs.com/package/hwrld
- Repository: https://github.com/bersling/typescript-library-starter
- Homepage: https://github.com/bersling/typescript-library-starter#readme
- Issues: https://github.com/bersling/typescript-library-starter/issues
- npm.io page: https://npm.io/package/hwrld

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 2.2.1 (latest) — 2023-09-08
- 2.2.0-beta.1 (beta) — 2023-09-08
- 2.1.0 (next) — 2021-03-09
- 2.2.0 — 2023-09-08
- 2.1.1 — 2021-03-09
- 2.1.1-beta.1 — 2021-03-09
- 2.0.0 — 2018-06-30
- 1.0.1 — 2017-06-20
- 1.0.0 — 2017-06-17
- 0.0.3 — 2017-06-17
- 0.0.2 — 2017-06-17
- 0.0.1 — 2017-06-17

## README

# Example Typescript 6.x Library

Simple starter library updated in 2026.

Tutorial can be found at
[https://www.tsmean.com/articles/how-to-write-a-typescript-library/](https://www.tsmean.com/articles/how-to-write-a-typescript-library/).

# Usage

First you should get the repo
```
git clone https://github.com/bersling/typescript-library-starter.git
```

Then you can apply any changes you'd like to the `library-starter`.

## Give it a name

Adjust the `name` in `library-starter/package.json`. Check with `npm` to see which names are still free.

You can also adjust the version back to `1.0.0` or `0.0.1`.

## Testing your module locally with npm link

Using [npm link](https://www.tsmean.com/articles/how-to-write-a-typescript-library/local-consumer) you can easily test whether your changes are working correctly.

```
cd example-consumer
npm run linklib
npm test
```

Here `npm run linklib` is just an alias for `npm run --prefix ../library-starter build && npm link ../library-starter`.

## Publishing a beta aka. "next" version

In order not to break things for the users of your library it is a best practice to first publish it with a `beta` or `next` tag. That way early adopters or yourself can test some more by using `npm install mylib@beta` and once you're ready you can publish the actual version `npm publish mylib`.

Change the `version` property in `library-starter/package.json` for example to `2.1.1-beta.1`.

```
cd library-starter
npm run publish-beta
```

Here `npm run publish-beta` is an alias for `npm run build && npm publish --tag beta`.

Then test it through

```
cd example-consumer
npm run install-beta
npm test
```

`npm run install-beta` is an alias for `npm install hwrld@beta`.

## Dry run of publish

It is also a good idea to do a dry run before you publish. That way you can check once more whether the version is correctly specified and you include the correct files.

```
cd library-starter
npm run publish-dryrun
```

`npm run publish-dryrun` is an alias for `npm run build && npm publish --dry-run`.

## Publish a new version

First adjust the `version` in `library-starter/package.json`.

Once you are ready to publish an actual version you can run

```
cd library-starter
npm run publish-lib
```

`npm run publish-lib` is an alias for `npm run build && npm publish`

You can consume it like this:
```
cd example-consumer
npm run install-lib
npm test
```

`npm run install-lib` is equal to `npm install hwrld` or `npm install hwrld@latest`.

# Further reading

You can write a test like this:
https://www.tsmean.com/articles/how-to-write-a-typescript-library/unit-testing

---
_Source: https://npm.io/package/hwrld · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
