diff --git a/script-base.js b/script-base.js index 6ee2e39..1964fc4 100644 --- a/script-base.js +++ b/script-base.js @@ -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)); }; diff --git a/templates/styles/Component.less b/templates/styles/Component.less new file mode 100644 index 0000000..2bb362b --- /dev/null +++ b/templates/styles/Component.less @@ -0,0 +1,3 @@ +.<%= classedName %>{ + border: 1px dashed #f00; +} \ No newline at end of file diff --git a/templates/styles/Component.sass b/templates/styles/Component.sass new file mode 100644 index 0000000..9811abb --- /dev/null +++ b/templates/styles/Component.sass @@ -0,0 +1,2 @@ +.<%= classedName %> + border: 1px dashed #f00 diff --git a/templates/styles/Component.styl b/templates/styles/Component.styl new file mode 100644 index 0000000..4cc329f --- /dev/null +++ b/templates/styles/Component.styl @@ -0,0 +1,2 @@ +.<%= classedName %> + border 1px dashed #f00