This repository has been archived by the owner on May 25, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to yeoman-generator 0.20.1 + test
Fixes #551.
- Loading branch information
Showing
17 changed files
with
506 additions
and
306 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
node_modules | ||
dist | ||
.tmp<% if (includeSass) { %> | ||
.sass-cache<% } %> | ||
.tmp | ||
<% if (includeSass) { -%> | ||
.sass-cache | ||
<% } -%> | ||
bower_components |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
'use strict'; | ||
var path = require('path'); | ||
var helpers = require('yeoman-generator').test; | ||
var assert = require('yeoman-assert'); | ||
|
||
describe('babel', function () { | ||
before(function (done) { | ||
helpers.run(path.join(__dirname, '../app')) | ||
.inDir(path.join(__dirname, '.tmp')) | ||
.withOptions({'skip-install': true, babel: true}) | ||
.withPrompts({features: []}) | ||
.on('end', done); | ||
}); | ||
|
||
it('adds Grunt plugin', function () { | ||
assert.fileContent('package.json', 'babel'); | ||
}); | ||
|
||
it('adds Grunt task', function () { | ||
assert.fileContent('Gruntfile.js', 'babel'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
'use strict'; | ||
var path = require('path'); | ||
var helpers = require('yeoman-generator').test; | ||
var assert = require('yeoman-assert'); | ||
|
||
describe('bootstrap', function () { | ||
describe('general', function () { | ||
before(function (done) { | ||
helpers.run(path.join(__dirname, '../app')) | ||
.inDir(path.join(__dirname, '.tmp')) | ||
.withOptions({'skip-install': true}) | ||
.withPrompts({features: [ | ||
'includeBootstrap' | ||
]}) | ||
.on('end', done); | ||
}); | ||
|
||
it('adds Bootstrap dependency', function () { | ||
assert.fileContent('bower.json', 'bootstrap'); | ||
}); | ||
|
||
it('doesn\'t explicitly add jQuery dependency', function () { | ||
assert.noFileContent('bower.json', 'jquery'); | ||
}); | ||
|
||
it('adds Bootstrap paths to Gruntfile.js', function () { | ||
assert.fileContent('Gruntfile.js', 'bootstrap'); | ||
}); | ||
|
||
it('adds HTML description', function () { | ||
assert.fileContent('app/index.html', 'Bootstrap'); | ||
}); | ||
}); | ||
|
||
describe('with Sass', function () { | ||
before(function (done) { | ||
helpers.run(path.join(__dirname, '../app')) | ||
.inDir(path.join(__dirname, '.tmp')) | ||
.withOptions({'skip-install': true}) | ||
.withPrompts({features: [ | ||
'includeSass', | ||
'includeBootstrap' | ||
]}) | ||
.on('end', done); | ||
}); | ||
|
||
it('uses Bootstrap Sass', function () { | ||
assert.fileContent('bower.json', '"bootstrap-sass-official"'); | ||
assert.fileContent('Gruntfile.js', '/bootstrap-sass-official/'); | ||
}); | ||
}); | ||
|
||
describe('without Sass', function () { | ||
before(function (done) { | ||
helpers.run(path.join(__dirname, '../app')) | ||
.inDir(path.join(__dirname, '.tmp')) | ||
.withOptions({'skip-install': true}) | ||
.withPrompts({features: [ | ||
'includeBootstrap' | ||
]}) | ||
.on('end', done); | ||
}); | ||
|
||
it('uses regular Bootstrap', function () { | ||
assert.fileContent('bower.json', '"bootstrap"'); | ||
assert.fileContent('Gruntfile.js', '/bootstrap/'); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
'use strict'; | ||
var path = require('path'); | ||
var helpers = require('yeoman-generator').test; | ||
var assert = require('yeoman-assert'); | ||
|
||
describe('general', function () { | ||
before(function (done) { | ||
helpers.run(path.join(__dirname, '../app')) | ||
.inDir(path.join(__dirname, '.tmp')) | ||
.withOptions({'skip-install': true}) | ||
.withPrompts({features: []}) | ||
.on('end', done); | ||
}); | ||
|
||
// not testing the actual run of generators yet | ||
it('can be required without throwing', function () { | ||
this.app = require('../app'); | ||
}); | ||
|
||
it('creates expected files', function () { | ||
assert.file([ | ||
'package.json', | ||
'bower.json', | ||
'.bowerrc', | ||
'Gruntfile.js', | ||
'app/favicon.ico', | ||
'app/index.html', | ||
'app/scripts/main.js', | ||
'app/styles/main.css', | ||
'app/robots.txt', | ||
'test', | ||
'.jshintrc', | ||
'.editorconfig', | ||
'.gitignore', | ||
'.gitattributes' | ||
]); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
'use strict'; | ||
var path = require('path'); | ||
var helpers = require('yeoman-generator').test; | ||
var assert = require('yeoman-assert'); | ||
|
||
describe('modernizr', function () { | ||
before(function (done) { | ||
helpers.run(path.join(__dirname, '../app')) | ||
.inDir(path.join(__dirname, '.tmp')) | ||
.withOptions({'skip-install': true}) | ||
.withPrompts({features: [ | ||
'includeModernizr' | ||
]}) | ||
.on('end', done); | ||
}); | ||
|
||
it('adds Bower dependency', function () { | ||
assert.fileContent('bower.json', 'modernizr'); | ||
}); | ||
|
||
it('adds Grunt plugin', function () { | ||
assert.fileContent('package.json', 'modernizr'); | ||
}); | ||
|
||
it('adds Grunt task', function () { | ||
assert.fileContent('Gruntfile.js', 'modernizr'); | ||
}); | ||
|
||
it('adds HTML description', function () { | ||
assert.fileContent('app/index.html', 'Modernizr'); | ||
}); | ||
}); |
Oops, something went wrong.