mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 00:39:49 +00:00
Improve generators for scss files
This commit is contained in:
parent
5bac647ee9
commit
784a286329
@ -11,7 +11,7 @@ import { FormattedMessage } from 'react-intl';
|
||||
import messages from './messages';
|
||||
{{/if}}
|
||||
{{#if wantCSS}}
|
||||
import styles from './styles.css';
|
||||
import styles from './styles.scss';
|
||||
{{/if}}
|
||||
|
||||
class {{ properCase name }} extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
||||
|
@ -49,12 +49,12 @@ module.exports = {
|
||||
abortOnFail: true,
|
||||
}];
|
||||
|
||||
// If they want a CSS file, add styles.css
|
||||
// If they want a SCSS file, add styles.scss
|
||||
if (data.wantCSS) {
|
||||
actions.push({
|
||||
type: 'add',
|
||||
path: '../../app/components/{{properCase name}}/styles.css',
|
||||
templateFile: './component/styles.css.hbs',
|
||||
path: '../../app/components/{{properCase name}}/styles.scss',
|
||||
templateFile: './component/styles.scss.hbs',
|
||||
abortOnFail: true,
|
||||
});
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import messages from './messages';
|
||||
{{/if}}
|
||||
|
||||
{{#if wantCSS}}
|
||||
import styles from './styles.css';
|
||||
import styles from './styles.scss';
|
||||
{{/if}}
|
||||
|
||||
function {{ properCase name }}() {
|
||||
|
@ -58,7 +58,7 @@ module.exports = {
|
||||
abortOnFail: true,
|
||||
}];
|
||||
|
||||
// If they want a CSS file, add styles.css
|
||||
// If they want a SCSS file, add styles.scss
|
||||
if (data.wantCSS) {
|
||||
actions.push({
|
||||
type: 'add',
|
||||
|
Loading…
x
Reference in New Issue
Block a user