Skip to content

Commit

Permalink
feat(antd/next): add style generator (#3053)
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang authored Apr 19, 2022
1 parent 4a8760f commit fddd591
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/antd/create-style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ ${files
.map((path) => {
return `import '${path}'\n`
})
.join('')}`,
'utf8'
)
fs.writeFile(
path.resolve(__dirname, './src/style.less'),
`// auto generated code
${files
.map((path) => {
return `@import '${path}';\n`
})
.join('')}`,
'utf8'
)
Expand Down
10 changes: 10 additions & 0 deletions packages/next/create-style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ ${files
.map((path) => {
return `import '${path}'\n`
})
.join('')}`,
'utf8'
)
fs.writeFile(
path.resolve(__dirname, './src/main.scss'),
`// auto generated code
${files
.map((path) => {
return `@import '${path}';\n`
})
.join('')}`,
'utf8'
)
Expand Down
16 changes: 16 additions & 0 deletions packages/next/src/main.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// auto generated code
@import './array-base/main.scss';
@import './array-cards/main.scss';
@import './array-collapse/main.scss';
@import './array-items/main.scss';
@import './array-table/main.scss';
@import './date-picker2/main.scss';
@import './editable/main.scss';
@import './form-button-group/main.scss';
@import './form-grid/main.scss';
@import './form-item/main.scss';
@import './form-layout/main.scss';
@import './form/main.scss';
@import './preview-text/main.scss';
@import './select-table/main.scss';
@import './upload/main.scss';

0 comments on commit fddd591

Please sign in to comment.