Skip to content

Commit

Permalink
Merge pull request #56 from passy/bower09
Browse files Browse the repository at this point in the history
Upgraded to bower 0.9 glossary
  • Loading branch information
sindresorhus committed Apr 26, 2013
2 parents e0f39d0 + 28a933d commit fe23cd6
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion app/USAGE
Expand Up @@ -10,7 +10,7 @@ Example:

This will create:
Gruntfile.js: Configuration for the task runner.
component.json: Front-end packages installed by bower.
bower.json: Front-end packages installed by bower.
package.json: Development packages installed by npm.

app/: Your application files.
Expand Down
34 changes: 17 additions & 17 deletions app/index.js
Expand Up @@ -92,7 +92,7 @@ AppGenerator.prototype.git = function git() {

AppGenerator.prototype.bower = function bower() {
this.copy('bowerrc', '.bowerrc');
this.copy('_component.json', 'component.json');
this.copy('_bower.json', 'bower.json');
};

AppGenerator.prototype.jshint = function jshint() {
Expand Down Expand Up @@ -145,7 +145,7 @@ AppGenerator.prototype.writeIndex = function writeIndex() {

if (!this.includeRequireJS) {
this.indexFile = this.appendScripts(this.indexFile, 'scripts/main.js', [
'components/jquery/jquery.js',
'bower_components/jquery/jquery.js',
'scripts/main.js'
]);

Expand All @@ -161,19 +161,19 @@ AppGenerator.prototype.writeIndex = function writeIndex() {
if (this.compassBootstrap && !this.includeRequireJS) {
// wire Twitter Bootstrap plugins
this.indexFile = this.appendScripts(this.indexFile, 'scripts/plugins.js', [
'components/sass-bootstrap/js/bootstrap-affix.js',
'components/sass-bootstrap/js/bootstrap-alert.js',
'components/sass-bootstrap/js/bootstrap-dropdown.js',
'components/sass-bootstrap/js/bootstrap-tooltip.js',
'components/sass-bootstrap/js/bootstrap-modal.js',
'components/sass-bootstrap/js/bootstrap-transition.js',
'components/sass-bootstrap/js/bootstrap-button.js',
'components/sass-bootstrap/js/bootstrap-popover.js',
'components/sass-bootstrap/js/bootstrap-typeahead.js',
'components/sass-bootstrap/js/bootstrap-carousel.js',
'components/sass-bootstrap/js/bootstrap-scrollspy.js',
'components/sass-bootstrap/js/bootstrap-collapse.js',
'components/sass-bootstrap/js/bootstrap-tab.js'
'bower_components/sass-bootstrap/js/bootstrap-affix.js',
'bower_components/sass-bootstrap/js/bootstrap-alert.js',
'bower_components/sass-bootstrap/js/bootstrap-dropdown.js',
'bower_components/sass-bootstrap/js/bootstrap-tooltip.js',
'bower_components/sass-bootstrap/js/bootstrap-modal.js',
'bower_components/sass-bootstrap/js/bootstrap-transition.js',
'bower_components/sass-bootstrap/js/bootstrap-button.js',
'bower_components/sass-bootstrap/js/bootstrap-popover.js',
'bower_components/sass-bootstrap/js/bootstrap-typeahead.js',
'bower_components/sass-bootstrap/js/bootstrap-carousel.js',
'bower_components/sass-bootstrap/js/bootstrap-scrollspy.js',
'bower_components/sass-bootstrap/js/bootstrap-collapse.js',
'bower_components/sass-bootstrap/js/bootstrap-tab.js'
]);
}

Expand Down Expand Up @@ -204,7 +204,7 @@ AppGenerator.prototype.writeIndex = function writeIndex() {
// TODO(mklabs): to be put in a subgenerator like rjs:app
AppGenerator.prototype.requirejs = function requirejs() {
if (this.includeRequireJS) {
this.indexFile = this.appendScripts(this.indexFile, 'scripts/main.js', ['components/requirejs/require.js'], {
this.indexFile = this.appendScripts(this.indexFile, 'scripts/main.js', ['bower_components/requirejs/require.js'], {
'data-main': 'scripts/main'
});

Expand All @@ -220,7 +220,7 @@ AppGenerator.prototype.requirejs = function requirejs() {
this.mainJsFile = [
'require.config({',
' paths: {',
' jquery: \'../components/jquery/jquery\',',
' jquery: \'../bower_components/jquery/jquery\',',
' bootstrap: \'vendor/bootstrap\'',
' },',
' shim: {',
Expand Down
2 changes: 1 addition & 1 deletion app/templates/Gruntfile.js
Expand Up @@ -155,7 +155,7 @@ module.exports = function (grunt) {
imagesDir: '<%%= yeoman.app %>/images',
javascriptsDir: '<%%= yeoman.app %>/scripts',
fontsDir: '<%%= yeoman.app %>/styles/fonts',
importPath: '<%%= yeoman.app %>/components',
importPath: '<%%= yeoman.app %>/bower_components',
httpImagesPath: '/images',
httpGeneratedImagesPath: '/images',
relativeAssets: false
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion app/templates/bowerrc
@@ -1,3 +1,3 @@
{
"directory": "app/components"
"directory": "app/bower_components"
}
2 changes: 1 addition & 1 deletion app/templates/gitignore
Expand Up @@ -2,4 +2,4 @@ node_modules
dist
.tmp
.sass-cache
app/components
app/bower_components
2 changes: 1 addition & 1 deletion app/templates/index.html
Expand Up @@ -12,7 +12,7 @@
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<link rel="stylesheet" href="styles/main.css">
<!-- build:js scripts/vendor/modernizr.js -->
<script src="components/modernizr/modernizr.js"></script>
<script src="bower_components/modernizr/modernizr.js"></script>
<!-- endbuild -->
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions test/test.js
Expand Up @@ -29,7 +29,7 @@ describe('Webapp generator test', function () {

it('creates expected files in non-AMD mode', function (done) {
var expected = [
['component.json', /"name": "temp"/],
['bower.json', /"name": "temp"/],
['package.json', /"name": "temp"/],
'Gruntfile.js',
'app/404.html',
Expand All @@ -55,7 +55,7 @@ describe('Webapp generator test', function () {

it('creates expected files in AMD mode', function (done) {
var expected= [
['component.json', /"name": "temp"/],
['bower.json', /"name": "temp"/],
['package.json', /"name": "temp"/],
'Gruntfile.js',
'app/404.html',
Expand Down

0 comments on commit fe23cd6

Please sign in to comment.