npm package: @my-templates/sample-library
Description: Demonstrates a sample library template
Author: lopatnov
Latest version: 1.1.5

# @my-templates/sample-library [![Twitter](https://img.shields.io/twitter/url?url=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2F%40my-templates%2Fsample-library)](https://twitter.com/intent/tweet?text=I%20want%20to%20share%20TypeScript%20library:&url=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2F%40my-templates%2Fsample-library)

[![npm](https://img.shields.io/npm/dt/@my-templates/sample-library)](https://www.npmjs.com/package/@my-templates/sample-library)
[![NPM version](https://badge.fury.io/js/%40my-templates%2Fsample-library.svg)](https://www.npmjs.com/package/@my-templates/sample-library)
[![License](https://img.shields.io/github/license/My-Templates/TypeScript-Library)](https://github.com/My-Templates/TypeScript-Library/blob/master/LICENSE)
[![GitHub issues](https://img.shields.io/github/issues/My-Templates/TypeScript-Library)](https://github.com/My-Templates/TypeScript-Library/issues)
[![GitHub forks](https://img.shields.io/github/forks/My-Templates/TypeScript-Library)](https://github.com/My-Templates/TypeScript-Library/network)
[![GitHub stars](https://img.shields.io/github/stars/My-Templates/TypeScript-Library)](https://github.com/My-Templates/TypeScript-Library/stargazers)
![GitHub top language](https://img.shields.io/github/languages/top/My-Templates/TypeScript-Library)

[![Build and Test package](https://github.com/My-Templates/TypeScript-Library/actions/workflows/build-and-test-package.yml/badge.svg)](https://github.com/My-Templates/TypeScript-Library/tree/master/tests)
[![Publish NPM package](https://github.com/My-Templates/TypeScript-Library/actions/workflows/npm-publish-package.yml/badge.svg)](https://github.com/My-Templates/TypeScript-Library/releases)
[![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/npm/@my-templates/sample-library)](https://www.npmjs.com/package/@my-templates/sample-library?activeTab=dependencies)

[![Patreon](https://img.shields.io/badge/Donate-Patreon-informational)](https://www.patreon.com/lopatnov)
[![sobe.ru](https://img.shields.io/static/v1?label=sobe.ru&message=%D0%91%D0%BB%D0%B0%D0%B3%D0%BE%D0%B4%D0%B0%D1%80%D0%BD%D0%BE%D1%81%D1%82%D1%8C&color=yellow&logo=data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAArlBMVEUAAAD//////////////////////////////////////////////////////////////////PP/3l7/9c//0yb/zAD/6ZP/zQf/++7/3FD/88X/0h7//v7/5oX/zATUqQDktgD/5HjQpgAFBACQcwD/zw/fsgCOcQD6yADZrQD2xAD8yQDnuADxwADcsADbrwDpugD3xQD5xwDjtQDywQD+ywD9ygDvvwD7yAD/1jRaObVGAAAAEHRSTlMAA3zg707pEJP8MMUBYN5fiwXJMQAAAAFiS0dEAf8CLd4AAAAHdElNRQflBgMAAxO4O2jCAAAAuElEQVQoz42S1w7CMAxFS8ueYZgNLZuyRynw/z9GdtxIkbgPceQT6Tq2vZwfEKx8wRPyiaViSYDABqQsAMq0OzxUqhbo9kBcavUM6A9AAtJAYDgC0ID7i+t4AghwfxanszlAGBnA/Flc0MfL1doA5s/ChoLtbg8QI392gpIBzf/AwYAWAsdTrIE05/nz5Xq7S6DKpenHM0pe+o/qg5Am74/0ybTkm+q6wG4iltV2LTko52idy+Banx9RYiS6Vrsc3AAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0wNi0wM1QwMDowMzoxOCswMDowMLvSSCkAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMDYtMDNUMDA6MDM6MTgrMDA6MDDKj/CVAAAAAElFTkSuQmCC)](https://sobe.ru/na/tech_knigi)
[![LinkedIn](https://img.shields.io/badge/LinkedIn-lopatnov-informational?style=social&logo=linkedin)](https://www.linkedin.com/in/lopatnov/)

The TypeScript library template. Click "Use this template on GitHub".

## Install

[![https://nodei.co/npm/@my-templates/sample-library.png?downloads=true&downloadRank=true&stars=true](https://nodei.co/npm/@my-templates/sample-library.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/@my-templates/sample-library)

```shell
npm install @my-templates/sample-library
```

[Browser](//my-templates.github.io/TypeScript-Library/dist/library.js)

```html
<script src="//my-templates.github.io/TypeScript-Library/dist/library.min.js"></script>
```

## Import package to the project

### TypeScript

```typescript
import sampleLibrary from "@my-templates/sample-library";
```

### JavaScript

```javascript
var sampleLibrary = require("@my-templates/sample-library");
```

## package.json

Change variables:

- name
- description
- umdName
- libraryFile
- main
- module
- types
- homepage
- repository
- bugs
- keywords

## GitHub publish configurations

- npm_token
- github_token

## Configure commands

`npm run build`

`npm run watch`

`npm run test`

## Demo

See, how it's working: [https://runkit.com/lopatnov/sample-library](https://runkit.com/lopatnov/sample-library)

Test it with a runkit: [https://npm.runkit.com/@my-templates/sample-library](https://npm.runkit.com/%40my-templates%2Fsample-library)

## Rights and Agreements

License [Apache-2.0](https://github.com/My-Templates/TypeScript-Library/blob/master/LICENSE)

Copyright 2019–2021 Oleksandr Lopatnov