mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 17:00:55 +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';
|
import messages from './messages';
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if wantCSS}}
|
{{#if wantCSS}}
|
||||||
import styles from './styles.css';
|
import styles from './styles.scss';
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
class {{ properCase name }} extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
class {{ properCase name }} extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
||||||
|
@ -49,12 +49,12 @@ module.exports = {
|
|||||||
abortOnFail: true,
|
abortOnFail: true,
|
||||||
}];
|
}];
|
||||||
|
|
||||||
// If they want a CSS file, add styles.css
|
// If they want a SCSS file, add styles.scss
|
||||||
if (data.wantCSS) {
|
if (data.wantCSS) {
|
||||||
actions.push({
|
actions.push({
|
||||||
type: 'add',
|
type: 'add',
|
||||||
path: '../../app/components/{{properCase name}}/styles.css',
|
path: '../../app/components/{{properCase name}}/styles.scss',
|
||||||
templateFile: './component/styles.css.hbs',
|
templateFile: './component/styles.scss.hbs',
|
||||||
abortOnFail: true,
|
abortOnFail: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ import messages from './messages';
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if wantCSS}}
|
{{#if wantCSS}}
|
||||||
import styles from './styles.css';
|
import styles from './styles.scss';
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
function {{ properCase name }}() {
|
function {{ properCase name }}() {
|
||||||
|
@ -58,7 +58,7 @@ module.exports = {
|
|||||||
abortOnFail: true,
|
abortOnFail: true,
|
||||||
}];
|
}];
|
||||||
|
|
||||||
// If they want a CSS file, add styles.css
|
// If they want a SCSS file, add styles.scss
|
||||||
if (data.wantCSS) {
|
if (data.wantCSS) {
|
||||||
actions.push({
|
actions.push({
|
||||||
type: 'add',
|
type: 'add',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user