https://github.com/qiwi/license
QIWI Open Source License
https://github.com/qiwi/license
license mit
Last synced: over 1 year ago
JSON representation
QIWI Open Source License
- Host: GitHub
- URL: https://github.com/qiwi/license
- Owner: qiwi
- License: other
- Created: 2019-09-30T14:44:00.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2025-02-08T05:45:53.000Z (almost 2 years ago)
- Last Synced: 2025-02-08T06:26:15.772Z (almost 2 years ago)
- Topics: license, mit
- Language: Smarty
- Homepage:
- Size: 1.24 MB
- Stars: 1
- Watchers: 8
- Forks: 1
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# QIWI Open Source Software License
[](https://github.com/qiwi/license/actions/workflows/ci.yaml)
[](https://codeclimate.com/github/qiwi/license/maintainability)
[](https://codeclimate.com/github/qiwi/license/test_coverage)
[](https://www.npmjs.com/package/@qiwi/license)
[MIT](https://en.wikipedia.org/wiki/MIT_License) compatible and corresponding to the [Civil Code](https://en.wikipedia.org/wiki/Civil_Code_of_Russia) of the Russian Federation.
* [License in English](./src/main/tpl/license_en.tpl) (en)
* [Лицензия на русском](./src/main/tpl/license_ru.tpl) (ru)
## Install
```bash
yarn add @qiwi/license -D
npm add @qiwi/license -D
```
## Usage
Through CLI
```bash
qiwilicense --name='@qiwi/some-project' --cwd=. --lang=en --file=LICENSE --type=mit --year=2019
```
With [npx](https://blog.npmjs.org/post/162869356040/introducing-npx-an-npm-package-runner)
```bash
npx @qiwi/license --type=mit --year=2019 --cwd=/some/path
```
TS/JS
```ts
import {generate, render} from '@qiwi/license'
// Get the text and do something next
const text = render({
lang: 'ru',
year: '2010-2019'
})
// Or just write to a file:
generate({
name: 'PROJECT_NAME',
cwd: resolve(__dirname, '../foo/bar'),
lang: 'en',
year: '2019'
})
```
## Options
| Option | Description | Default |
|-------------------------|--------------------------------------------|----------------------------|
| `year`, `y` | Sets year | `new Date().getFullYear()` |
| `lang`, `l` | Text language | `en` |
| `file`, `f` | License file name | `LICENSE` |
| `cwd`, `c`, `dir`, `d` | License target dir | `process.cwd()` |
| `name`, `n` | Project name | `name` from `package.json` |
| `type`, `t` | License type | `qosl` |
| `patch-pkg-json` | Set/update license field of `package.json` | `false` |
## License
MIT