mirror of
https://github.com/wassname/generator-react-webpack.git
synced 2026-08-30 11:23:47 +08:00
Use corresponding stylesheet depending on config variable
This commit is contained in:
@@ -38,6 +38,18 @@ var Generator = module.exports = function Generator() {
|
||||
|
||||
this.stylesSuffix = '.css';
|
||||
|
||||
switch(this.config.get('styles-language')) {
|
||||
case 'sass':
|
||||
this.stylesSuffix = '.sass';
|
||||
break;
|
||||
case 'less':
|
||||
this.stylesSuffix = '.less';
|
||||
break;
|
||||
case 'stylus':
|
||||
this.stylesSuffix = '.styl';
|
||||
break;
|
||||
}
|
||||
|
||||
this.sourceRoot(path.join(__dirname, sourceRoot));
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
.<%= classedName %>{
|
||||
border: 1px dashed #f00;
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
.<%= classedName %>
|
||||
border: 1px dashed #f00
|
||||
@@ -0,0 +1,2 @@
|
||||
.<%= classedName %>
|
||||
border 1px dashed #f00
|
||||
Reference in New Issue
Block a user