Skip to content

Commit

Permalink
Update scaffolder
Browse files Browse the repository at this point in the history
  • Loading branch information
willybrauner committed Feb 7, 2024
1 parent d36420b commit 165ef60
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 27 deletions.
12 changes: 6 additions & 6 deletions cli/tasks/scaffold-component/scaffold-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ const _reactComponentBuilder = async ({
destinationFilePath: `${componentPath}/${upperComponentName}.tsx`,
replaceExpressions: { upperComponentName },
})
// scaffold less module
// scaffold scss module
await createFile({
templateFilePath: `${componentsTemplatesDir}/react/component.less.template`,
destinationFilePath: `${componentPath}/${upperComponentName}.module.less`,
templateFilePath: `${componentsTemplatesDir}/react/component.scss.template`,
destinationFilePath: `${componentPath}/${upperComponentName}.module.scss`,
replaceExpressions: { upperComponentName },
})
}
Expand All @@ -66,10 +66,10 @@ const _domComponentBuilder = async ({
destinationFilePath: `${componentPath}/${upperComponentName}.ts`,
replaceExpressions: { upperComponentName },
})
// scaffold less module
// scaffold scss module
await createFile({
templateFilePath: `${componentsTemplatesDir}/dom/component.less.template`,
destinationFilePath: `${componentPath}/${upperComponentName}.less`,
templateFilePath: `${componentsTemplatesDir}/dom/component.scss.template`,
destinationFilePath: `${componentPath}/${upperComponentName}.scss`,
replaceExpressions: { upperComponentName },
})
// scaffold Twig
Expand Down
14 changes: 0 additions & 14 deletions cli/tasks/scaffold-component/templates/dom/component.less.template

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@use "../../styles/index" as *;

.%%upperComponentName%% {

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "./%%upperComponentName%%.less"
import "./%%upperComponentName%%.scss"
import { Component } from "@cher-ami/compose"
import debug from "@cher-ami/debug"

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@use "../../styles/index" as *;

.root {
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import css from './%%upperComponentName%%.module.less';
import css from './%%upperComponentName%%.module.scss';
import { cls } from "@cher-ami/utils"
import debug from "@cher-ami/debug";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import css from "./%%upperComponentName%%.module.less";
import css from "./%%upperComponentName%%.module.scss";
import React, { forwardRef, ForwardedRef, useRef } from "react";
import { useStack } from "@cher-ami/router";
import debug from "@cher-ami/debug"
Expand Down

0 comments on commit 165ef60

Please sign in to comment.