1.0.4 • Published 5 years ago

tcon-cli v1.0.4

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

tcon-cli

安装

xnpm i tcon-cli --save-dev

# or npm

npm i tcon-cli --save-dev

自定义变量文件 style/tcon/tcon-var.js,可定义的变量内容请参照 var.styl

module.exports = {
  color: {
    '000': '#111'
  },
  placeholder: '#333'
}

例如

tcon --i=style/tcon/tcon-var.js --o=style/tcon

目录结构

- main.js
- App.vue
- views
- components
- style
  - tcon
    - tcon-var.js
    - button.css
    - size.css
    - color.css

.babelrc 中增加 path 指向

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

在项目中引用

import { button, size } from 'tcon'

就会转化为

import 'style/tcon/button.css'
import 'style/tcon/size.css'

结合 babel 使用,请参考 babel-plugin-tcon

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago