Skip to content
This repository has been archived by the owner on May 25, 2019. It is now read-only.

Commit

Permalink
Merge pull request #513 from arthurvr/rubysass
Browse files Browse the repository at this point in the history
Remove ruby Sass option
  • Loading branch information
kevva committed May 11, 2015
2 parents 6c00a4c + 887d96b commit f4ffe3f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 45 deletions.
14 changes: 0 additions & 14 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,6 @@ module.exports = yeoman.generators.Base.extend({
value: 'includeModernizr',
checked: false
}]
}, {
when: function (answers) {
return answers && answers.features &&
answers.features.indexOf('includeSass') !== -1;
},
type: 'confirm',
name: 'libsass',
value: 'includeLibSass',
message: 'Would you like to use libsass? Read up more at \n' +
chalk.green('https://github.com/andrew/node-sass#node-sass'),
default: false
}];

this.prompt(prompts, function (answers) {
Expand All @@ -78,9 +67,6 @@ module.exports = yeoman.generators.Base.extend({
this.includeBootstrap = hasFeature('includeBootstrap');
this.includeModernizr = hasFeature('includeModernizr');

this.includeLibSass = answers.libsass;
this.includeRubySass = !answers.libsass;

done();
}.bind(this));
},
Expand Down
7 changes: 3 additions & 4 deletions app/templates/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,11 @@ module.exports = function (grunt) {

// Compiles Sass to CSS and generates necessary files if requested
sass: {
options: {<% if (includeLibSass) { %>
options: {
sourceMap: true,
includePaths: ['bower_components']
<% } else { %>
includePaths: ['bower_components'],
loadPath: 'bower_components'
<% } %>},
},
dist: {
files: [{
expand: true,
Expand Down
5 changes: 2 additions & 3 deletions app/templates/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@
"grunt-contrib-htmlmin": "^0.4.0",
"grunt-contrib-imagemin": "^0.9.3",<% if (testFramework === 'jasmine') { %>
"grunt-contrib-jasmine": "^0.8.2",<% } %>
"grunt-contrib-jshint": "^0.11.0",<% if (includeSass && includeRubySass) { %>
"grunt-contrib-sass": "^0.9.2",<% } %>
"grunt-contrib-jshint": "^0.11.0",
"grunt-contrib-uglify": "^0.8.0",
"grunt-contrib-watch": "^0.6.1",<% if (testFramework === 'mocha') { %>
"grunt-mocha": "^0.4.12",<% } %><% if (includeModernizr) { %>
"grunt-modernizr": "^0.6.0",<% } %>
"grunt-newer": "^1.1.0",
"grunt-filerev": "^2.2.0",<% if (includeSass && includeLibSass) { %>
"grunt-filerev": "^2.2.0",<% if (includeSass) { %>
"grunt-sass": "^1.0.0",<% } %>
"grunt-svgmin": "^2.0.1",
"grunt-usemin": "^3.0.0",
Expand Down
26 changes: 2 additions & 24 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,38 +129,16 @@ describe('Webapp generator', function () {
});
});

it('creates expected ruby SASS components', function (done) {
runGen.withOptions(options).withPrompt({features: ['includeSass']})
.on('end', function () {

assert.fileContent([
['Gruntfile.js', /sass/],
['app/index.html', /Sass/],
['.gitignore', /\.sass-cache/],
['package.json', /grunt-contrib-sass/]
]);

assert.noFileContent([
['package.json', /grunt-sass/],
['app/index.html', /Sass is a mature/]
]);

done();
});
});

it('creates expected node SASS files', function (done) {
it('creates expected Sass files', function (done) {
runGen.withOptions(options).withPrompt({
features: ['includeSass'],
libsass: true
features: ['includeSass']
}).on('end', function () {

assert.fileContent([
['package.json', /grunt-sass/]
]);

assert.noFileContent([
['package.json', /grunt-contrib-sass/],
['Gruntfile.js', /bootstrap-sass-official/]
]);

Expand Down

0 comments on commit f4ffe3f

Please sign in to comment.