-
Notifications
You must be signed in to change notification settings - Fork 109
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
20 changed files
with
409 additions
and
31 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 |
---|---|---|
@@ -1 +1 @@ | ||
[{"/Users/apple/99-study/source/sheep-ui/src/_utils/global-config.ts":"1","/Users/apple/99-study/source/sheep-ui/src/button/index.ts":"2","/Users/apple/99-study/source/sheep-ui/src/button/src/button-group.tsx":"3","/Users/apple/99-study/source/sheep-ui/src/App.vue":"4","/Users/apple/99-study/source/sheep-ui/src/main.ts":"5","/Users/apple/99-study/source/sheep-ui/src/space/index.ts":"6","/Users/apple/99-study/source/sheep-ui/src/_utils/is.ts":"7","/Users/apple/99-study/source/sheep-ui/src/_utils/vue-utils.ts":"8","/Users/apple/99-study/source/sheep-ui/src/space/src/space-type.ts":"9","/Users/apple/99-study/source/sheep-ui/src/space/src/space.tsx":"10","/Users/apple/99-study/source/sheep-ui/docs/docs.d.ts":"11","/Users/apple/99-study/source/sheep-ui/scripts/entry.ts":"12","/Users/apple/99-study/source/sheep-ui/src/components.ts":"13","/Users/apple/99-study/source/sheep-ui/src/index.ts":"14"},{"size":952,"mtime":1649689586245,"results":"15","hashOfConfig":"16"},{"size":439,"mtime":1650815446123,"results":"17","hashOfConfig":"18"},{"size":330,"mtime":1650814909312,"results":"19","hashOfConfig":"18"},{"size":2257,"mtime":1651375963261,"results":"20","hashOfConfig":"18"},{"size":251,"mtime":1651289910061,"results":"21","hashOfConfig":"18"},{"size":340,"mtime":1651389430545,"results":"22","hashOfConfig":"18"},{"size":273,"mtime":1651245242937,"results":"23","hashOfConfig":"18"},{"size":1590,"mtime":1651375307924,"results":"24","hashOfConfig":"18"},{"size":482,"mtime":1651282912529,"results":"25","hashOfConfig":"18"},{"size":2175,"mtime":1651375183080,"results":"26","hashOfConfig":"18"},{"size":507,"mtime":1651391782029,"results":"27","hashOfConfig":"18"},{"size":454,"mtime":1651389495989,"results":"28","hashOfConfig":"18"},{"size":119,"mtime":1651388865017,"results":"29","hashOfConfig":"18"},{"size":29,"mtime":1651388366309,"results":"30","hashOfConfig":"18"},{"filePath":"31","messages":"32","suppressedMessages":"33","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1gladtr",{"filePath":"34","messages":"35","suppressedMessages":"36","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1i1o27t",{"filePath":"37","messages":"38","suppressedMessages":"39","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"40","messages":"41","suppressedMessages":"42","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"43","messages":"44","suppressedMessages":"45","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"46","messages":"47","suppressedMessages":"48","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"49","messages":"50","suppressedMessages":"51","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"52","messages":"53","suppressedMessages":"54","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"55","messages":"56","suppressedMessages":"57","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"58","messages":"59","suppressedMessages":"60","errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"61","messages":"62","suppressedMessages":"63","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"64","messages":"65","suppressedMessages":"66","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"67","messages":"68","suppressedMessages":"69","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"70","messages":"71","suppressedMessages":"72","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/apple/99-study/source/sheep-ui/src/_utils/global-config.ts",[],[],"/Users/apple/99-study/source/sheep-ui/src/button/index.ts",[],[],"/Users/apple/99-study/source/sheep-ui/src/button/src/button-group.tsx",[],[],"/Users/apple/99-study/source/sheep-ui/src/App.vue",[],[],"/Users/apple/99-study/source/sheep-ui/src/main.ts",[],[],"/Users/apple/99-study/source/sheep-ui/src/space/index.ts",[],[],"/Users/apple/99-study/source/sheep-ui/src/_utils/is.ts",[],[],"/Users/apple/99-study/source/sheep-ui/src/_utils/vue-utils.ts",[],[],"/Users/apple/99-study/source/sheep-ui/src/space/src/space-type.ts",[],[],"/Users/apple/99-study/source/sheep-ui/src/space/src/space.tsx",["73","74","75"],[],"/Users/apple/99-study/source/sheep-ui/docs/docs.d.ts",[],["76","77"],"/Users/apple/99-study/source/sheep-ui/scripts/entry.ts",[],[],"/Users/apple/99-study/source/sheep-ui/src/components.ts",[],[],"/Users/apple/99-study/source/sheep-ui/src/index.ts",[],[],{"ruleId":"78","severity":1,"message":"79","line":1,"column":27,"nodeType":"80","messageId":"81","endLine":1,"endColumn":34},{"ruleId":"78","severity":1,"message":"82","line":3,"column":20,"nodeType":"80","messageId":"81","endLine":3,"endColumn":27},{"ruleId":"83","severity":1,"message":"84","line":54,"column":19,"nodeType":"85","messageId":"86","endLine":54,"endColumn":33,"suggestions":"87"},{"ruleId":"88","severity":2,"message":"89","line":14,"column":36,"nodeType":"90","messageId":"91","endLine":14,"endColumn":38,"suppressions":"92"},{"ruleId":"88","severity":2,"message":"89","line":14,"column":40,"nodeType":"90","messageId":"91","endLine":14,"endColumn":42,"suppressions":"93"},"@typescript-eslint/no-unused-vars","'Comment' is defined but never used.","Identifier","unusedVar","'isArray' is defined but never used.","@typescript-eslint/no-non-null-assertion","Forbidden non-null assertion.","TSNonNullExpression","noNonNull",["94"],"@typescript-eslint/ban-types","Don't use `{}` as a type. `{}` actually means \"any non-nullish value\".\n- If you want a type meaning \"any object\", you probably want `Record<string, unknown>` instead.\n- If you want a type meaning \"any value\", you probably want `unknown` instead.\n- If you want a type meaning \"empty object\", you probably want `Record<string, never>` instead.","TSTypeLiteral","bannedTypeMessage",["95"],["96"],{"messageId":"97","fix":"98","desc":"99"},{"kind":"100","justification":"101"},{"kind":"100","justification":"101"},"suggestOptionalChain",{"range":"102","text":"103"},"Consider using the optional chain operator `?.` instead. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator.","directive","",[1815,1816],"?."] | ||
[{"/Users/yangtao/projects/sheep-ui/sheep-ui/src/tree/index.ts":"1","/Users/yangtao/projects/sheep-ui/sheep-ui/cli/shared/create-component.ts":"2","/Users/yangtao/projects/sheep-ui/sheep-ui/cli/template/core.ts":"3","/Users/yangtao/projects/sheep-ui/sheep-ui/cli/template/index.ts":"4","/Users/yangtao/projects/sheep-ui/sheep-ui/cli/template/style.ts":"5","/Users/yangtao/projects/sheep-ui/sheep-ui/cli/template/test.ts":"6","/Users/yangtao/projects/sheep-ui/sheep-ui/cli/template/types.ts":"7","/Users/yangtao/projects/sheep-ui/sheep-ui/src/tree/src/tree-type.ts":"8","/Users/yangtao/projects/sheep-ui/sheep-ui/src/tree/src/tree.tsx":"9","/Users/yangtao/projects/sheep-ui/sheep-ui/src/tree/test/tree.test.ts":"10"},{"size":328,"mtime":1652262221840},{"size":2065,"mtime":1652262209452,"results":"11","hashOfConfig":"12"},{"size":669,"mtime":1652260250762,"results":"13","hashOfConfig":"12"},{"size":489,"mtime":1652262251865,"results":"14","hashOfConfig":"12"},{"size":102,"mtime":1652261397357,"results":"15","hashOfConfig":"12"},{"size":362,"mtime":1652261472172,"results":"16","hashOfConfig":"12"},{"size":441,"mtime":1652261208355,"results":"17","hashOfConfig":"12"},{"size":146,"mtime":1652262221838,"results":"18","hashOfConfig":"12"},{"size":290,"mtime":1652262221837},{"size":218,"mtime":1652262221839,"results":"19","hashOfConfig":"12"},{"filePath":"20","messages":"21","suppressedMessages":"22","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"kzw0my",{"filePath":"23","messages":"24","suppressedMessages":"25","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","suppressedMessages":"28","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"29","messages":"30","suppressedMessages":"31","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"32","messages":"33","suppressedMessages":"34","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"35","messages":"36","suppressedMessages":"37","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"38","messages":"39","suppressedMessages":"40","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"41","messages":"42","suppressedMessages":"43","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/yangtao/projects/sheep-ui/sheep-ui/cli/shared/create-component.ts",[],[],"/Users/yangtao/projects/sheep-ui/sheep-ui/cli/template/core.ts",[],[],"/Users/yangtao/projects/sheep-ui/sheep-ui/cli/template/index.ts",[],[],"/Users/yangtao/projects/sheep-ui/sheep-ui/cli/template/style.ts",[],[],"/Users/yangtao/projects/sheep-ui/sheep-ui/cli/template/test.ts",[],[],"/Users/yangtao/projects/sheep-ui/sheep-ui/cli/template/types.ts",[],[],"/Users/yangtao/projects/sheep-ui/sheep-ui/src/tree/src/tree-type.ts",["44"],[],"/Users/yangtao/projects/sheep-ui/sheep-ui/src/tree/test/tree.test.ts",[],[],{"ruleId":"45","severity":1,"message":"46","line":1,"column":28,"nodeType":"47","messageId":"48","endLine":1,"endColumn":36},"@typescript-eslint/no-unused-vars","'PropType' is defined but never used.","Identifier","unusedVar"] |
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
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
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
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 @@ | ||
import { upperFirst } from './utils' | ||
|
||
export default function genIndexTemplate(name) { | ||
const compName = upperFirst(name) | ||
return `\ | ||
import { App } from 'vue' | ||
import ${compName} from './src/${name}' | ||
import { installComponent } from '../install' | ||
import type { SheepUIOptions } from '../_utils/global-config' | ||
// 具名导出 | ||
export { ${compName} } | ||
// 导出插件 | ||
export default { | ||
install(app: App, options?: SheepUIOptions) { | ||
installComponent(app, ${compName}, options) | ||
} | ||
} | ||
` | ||
} |
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,8 @@ | ||
export function genStyleTemplate(name) { | ||
return `\ | ||
.s-${name} { | ||
/* your component style */ | ||
} | ||
` | ||
} |
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,15 @@ | ||
import { upperFirst } from './utils' | ||
|
||
export default function genTestTemplate(name) { | ||
return `\ | ||
import { render } from '@testing-library/vue' | ||
import ${upperFirst(name)} from '../src/${name}' | ||
describe('${name} test', () => { | ||
test('${name} init render', async () => { | ||
const { getByRole } = render(${upperFirst(name)}) | ||
getByRole('${name}') | ||
}) | ||
}) | ||
` | ||
} |
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,14 @@ | ||
import { upperFirst } from './utils' | ||
// 创建组件属性类型声明文件模板 | ||
export default function genTypesTemplate(name: string) { | ||
// 属性类型声明和属性类型 | ||
const propsTypeName = upperFirst(name) + 'Props' | ||
const propsName = name + 'Props' | ||
|
||
return `\ | ||
import { ExtractPropTypes, PropType } from 'vue' | ||
export const ${propsName} = {} as const | ||
export type ${propsTypeName} = ExtractPropTypes<typeof ${propsName}> | ||
` | ||
} |
Oops, something went wrong.