-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Component({}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"component": true, | ||
"usingComponents": { | ||
"t-$$var_textInFile": "tdesign-miniprogram/$$var_textInFile/$$var_textInFile" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<t-$$var_textInFile></t-$$var_textInFile> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# @see https://editorconfig-specification.readthedocs.io/en/latest/ | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
|
||
# 4 space indentation | ||
[*.py] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
# Tab indentation (no size specified) | ||
[Makefile] | ||
indent_style = tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Component({}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"component": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<view class="demo-title"></view> | ||
<view class="demo-desc"></view> | ||
<t-demo title="01 类型" desc=""> </t-demo> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"component-json-template": { | ||
"prefix": "newts", | ||
"body": [ | ||
"import { SuperComponent, wxComponent } from '../common/src/index';", | ||
"import config from '../common/config';", | ||
"import props from './props';", | ||
"", | ||
"const { prefix } = config;", | ||
"const name = `\\${prefix}-$1`;", | ||
"", | ||
"@wxComponent()", | ||
"export default class $2 extends SuperComponent {", | ||
" externalClasses = [", | ||
" `\\${prefix}-class`,", | ||
" ];", | ||
"", | ||
" properties = props;", | ||
"", | ||
" observers = {", | ||
" };", | ||
"", | ||
" data = {", | ||
" classPrefix: name,", | ||
" prefix,", | ||
" };", | ||
"", | ||
" methods = {", | ||
" ", | ||
" }", | ||
"}", | ||
"", | ||
], | ||
"scope": "typescript", | ||
"description": "新组件 ts" | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* This file is a configuration file generated by the `Template` extension on `vscode` | ||
* @see https://marketplace.visualstudio.com/items?itemName=yongwoo.template | ||
*/ | ||
module.exports = { | ||
// You can change the template path to another path | ||
templateRootPath: "./.templates", | ||
// After copying the template file the `replaceFileTextFn` function is executed | ||
replaceFileTextFn: (fileText, templateName, utils) => { | ||
// @see https://www.npmjs.com/package/change-case | ||
const { changeCase } = utils; | ||
// You can change the text in the file | ||
return fileText | ||
.replace(/__templateName__/g, templateName) | ||
.replace( | ||
/__templateNameToPascalCase__/g, | ||
changeCase.pascalCase(templateName) | ||
) | ||
.replace( | ||
/__templateNameToParamCase__/g, | ||
changeCase.paramCase(templateName) | ||
); | ||
}, | ||
renameFileFn: (fileName, templateName, utils) => { | ||
const { path } = utils; | ||
const { base } = path.parse(fileName); | ||
return base.replace(/__templateName__/gm, templateName); | ||
}, | ||
renameSubDirectoriesFn: (directoryName, templateName, _utils) => { | ||
const { changeCase } = _utils; | ||
const newDirectoryName = changeCase.paramCase(templateName); | ||
return directoryName.replace(/__templateName__/g, newDirectoryName); | ||
} | ||
}; |