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';
{{/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

View File

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

View File

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

View File

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