Skip to content

Commit

Permalink
fix(generator): remove duplicate import + prepend import in file
Browse files Browse the repository at this point in the history
Signed-off-by: feoche <[email protected]>
  • Loading branch information
feoche committed May 10, 2023
1 parent f22f44d commit bf0389d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
9 changes: 1 addition & 8 deletions packages/tools/generator/component/saofile.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ module.exports = {
type: 'modify',
files: `${config.outDir}/${config.odsThemingPath}/ods-size-definitions.scss`,
handler(data) {
return data + `@import './${config.corePrefix}-theming-size.${templateData.name}.scss';`
return `@import './${config.corePrefix}-theming-size.${templateData.name}';` + data;
}
},

Expand All @@ -192,13 +192,6 @@ module.exports = {
patterns: {
'theming/component-theming-size.scss': `${config.outDir}/${config.odsThemingPath}/${config.corePrefix}-theming-size.${templateData.name}.scss`,
}
},
{
type: 'modify',
files: `${config.outDir}/${config.odsThemingPath}/ods-size-definitions.scss`,
handler(data) {
return data + `@import './${config.corePrefix}-theming-size.${templateData.name}.scss';`
}
}
];
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@

/// @access private
//@function ods-get-<% componentName %>-size-properties($size-name) {
//@function ods-get-<%= name %>-size-properties($size-name) {
// @return (
//
// )
//}

/// @access private
//@function ods-get-<% componentName %>-component-size-definition() {
//@function ods-get-<%= name %>-component-size-definition() {
// @return (
// md: ods-get-<% componentName %>-size-properties(md)
// md: ods-get-<%= name %>-size-properties(md)
// );
//}

0 comments on commit bf0389d

Please sign in to comment.