Improve generators for scss files

This commit is contained in:
Pierre Burgy 2017-05-10 14:45:32 +02:00
parent 5bac647ee9
commit 784a286329
5 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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,
}); });
} }

View File

@ -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 }}() {

View File

@ -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',