# babel-plugin-tcon

> 安装

Latest version **1.0.13** (published 2019-07-29) · ISC license · 0 weekly downloads

## Install

```sh
npm install babel-plugin-tcon
pnpm add babel-plugin-tcon
yarn add babel-plugin-tcon
bun add babel-plugin-tcon
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.13 |
| Published | 2019-07-29 |
| First published | 2019-04-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | jmingzi |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-tcon
- Repository: https://github.com/visualization-page/babel-plugin-tcon
- Homepage: https://github.com/visualization-page/babel-plugin-tcon#readme
- Issues: https://github.com/visualization-page/babel-plugin-tcon/issues
- npm.io page: https://npm.io/package/babel-plugin-tcon

## Dependencies (1)

- [@babel/helper-module-imports](https://npm.io/package/@babel/helper-module-imports.md) ^7.0.0

## Recent versions

- 1.0.13 (latest) — 2019-07-29
- 1.0.12 — 2019-07-29
- 1.0.11 — 2019-07-29
- 1.0.10 — 2019-07-29
- 1.0.9 — 2019-05-13
- 1.0.8 — 2019-04-26
- 1.0.7 — 2019-04-01
- 1.0.6 — 2019-04-01
- 1.0.5 — 2019-04-01
- 1.0.4 — 2019-04-01
- 1.0.3 — 2019-04-01
- 1.0.2 — 2019-04-01
- 1.0.1 — 2019-04-01

## README

# babel-plugin-tcon

安装

```
xnpm i babel-plugin-tcon --save-dev

# or npm

npm i babel-plugin-tcon --save-dev
```

添加到 plugin，指定样式文件夹 

```json
{
  "plugins": [
    "babel-plugin-tcon"
  ]
}
```

当使用 `tcon-cli` 定制样式到项目后，需要指定样式目录 

```json
{
  "plugins": [
    [
      "babel-plugin-tcon", {
        "libPath": "style/tcon" 
      }
    ]
  ]
}
```

例如，默认是使用 alias `@`，在项目中一般把他设置为 `src/` 目录。

```js
import 'tcon/button/size/layout'

// ===>

import '@/style/tcon/button.css'
import '@/style/tcon/size.css'
import '@/style/tcon/layout.css'
```

也可以不使用 alias

```json
{
  "plugins": [
    [
      "babel-plugin-tcon", {
        "libPath": "src/style/tcon",
        "noAlias": true
      }
    ]
  ]
}
```

这样便需要手动指定 src 目录了

```js
import 'tcon/button'

// ===>

import './src/style/tcon/button.css'
```

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