# cddt **Repository Path**: cddsgtc_admin/cddt ## Basic Information - **Project Name**: cddt - **Description**: 用来编译和复用 vue 模版的 nodejs 命令行工具。 - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-01-04 - **Last Updated**: 2021-01-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # cddt 用来编译和复用 vue 模版的 nodejs 命令行工具。 ## 安装 ```cmd npm i -g cddt ``` ## 使用方法 ```cmd Usage: cddt [options] Options: -v --version 版本 -tn --tname <模版名称> vue模板名称 -cn --className <类名> vue模板类名 -y --type [类型] vue模板类型名目前的值有page,widget (default: "page") -o --out [路径] 导出路径 (default: "./output") -on --outName [名称] 导出模板的名称 (default: "out.vue") -f --from [路径] 编译的模版来源路径 -h, --help display help for command ``` ## 示例 ```cmd cddt -f templates/page.p.vue -tn cdd -cn cdd_fist -o dist/out ``` ## 编译规则 形式:`${name}` 本项目对应 1. cname:tname 2. className:className [点击查看](https://www.lodashjs.com/docs/lodash.template#_templatestring-options) ## 新需求 1. 添加默认模版路径 2. 添加模版类型