Socket
Book a DemoInstallSign in
Socket

@hh.ru/ts-utils

Package Overview
Dependencies
Maintainers
15
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hh.ru/ts-utils

Convenience utils for TypeScript

latest
npmnpm
Version
1.0.7
Version published
Maintainers
15
Created
Source

ts-utils

Утилиты для удобной работы с TypeScript проектами

Установка

Для установки достаточно добавить пакет в зависимости

yarn add @hh.ru/ts-utils

tsconfig

Генерирует tsconfig.js используя переданный объект с параметрами

Параметрами можно передать мапу webpack-алиасов для резолва модулей, перечень glob-путей для включения/исключения из сборки и заоверрайдить любой параметр compilerOptions

const tsConfigGenerator = require('@hh.ru/ts-utils');

tsConfigGenerator({
    webpackAliases: {
        app: 'static/app/',
        bloko: 'static/bloko/',
    },
    include: ['static/app/**/*'],
    exclude: ['static/bloko/**/*'],
    compilerOptions: {
        plugins: [
            {
                name: 'typescript-plugin-css-modules',
                options: {
                    classnameTransform: 'camelCaseOnly',
                    customMatcher: '\\.less$',
                    customRenderer: 'node_modules/less-plugin-aliases/lib/customRender.js',
                },
            },
        ],
    },
});

ts-check

Выполняет тайп-чекинг кода и генерирует json-отчет для bamboo

Добавляет алиас для запуска через yarn

yarn ts-check

FAQs

Package last updated on 19 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts