Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

Commit

Permalink
fix(build): remove references to global yeomanConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
passy committed Sep 9, 2013
1 parent 67c0ebf commit a0f16e2
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions templates/common/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,12 @@ module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
require('time-grunt')(grunt);

// configurable paths
var yeomanConfig = {
app: 'app',
dist: 'dist'
};

try {
yeomanConfig.app = require('./bower.json').appPath || yeomanConfig.app;
} catch (e) {}

grunt.initConfig({
yeoman: yeomanConfig,
yeoman: {
// configurable paths
app: require('./bower.json').appPath || 'app',
dist: 'dist'
},
watch: {
coffee: {
files: ['<%%= yeoman.app %>/scripts/{,*/}*.coffee'],
Expand Down Expand Up @@ -75,7 +69,7 @@ module.exports = function (grunt) {
open: true,
base: [
'.tmp',
yeomanConfig.app
'<%%= yeoman.app %>'
]
}
},
Expand All @@ -84,13 +78,13 @@ module.exports = function (grunt) {
middleware: [
'.tmp',
'test',
yeomanConfig.app
'<%%= yeoman.app %>'
]
}
},
dist: {
options: {
base: yeomanConfig.dist
base: '<%%= yeoman.dist %>'
}
}
},
Expand Down

2 comments on commit a0f16e2

@eddiemonge
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was this done? i feel like the opposite approach should be taken where the config is expanded to even more and can also be overriden with an outside config file

@passy
Copy link
Member Author

@passy passy commented on a0f16e2 Sep 14, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's still easy enough to do this yourself, but it makes the initial config a lot easier to read. This started in generator-webapp.

Please sign in to comment.