Skip to content

Commit 2c03d3a

Browse files
author
Dean Sofer
committed
Merge pull request angular-ui#82 from petebacondarwin/build-changes
Updated grunt to use grunt-coffee and now ignoring built files
2 parents 417dcc8 + feda1d0 commit 2c03d3a

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

grunt.js

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,20 @@ var testacular = require('testacular');
44
module.exports = function(grunt) {
55

66
grunt.loadNpmTasks('grunt-recess');
7+
grunt.loadNpmTasks('grunt-coffee');
78

89
// Project configuration.
910
grunt.initConfig({
1011
pkg: '<json:package.json>',
1112
meta: {
1213
banner: '/**\n' + ' * <%= pkg.description %>\n' + ' * @version v<%= pkg.version %> - ' + '<%= grunt.template.today("yyyy-mm-dd") %>\n' + ' * @link <%= pkg.homepage %>\n' + ' * @license MIT License, http://www.opensource.org/licenses/MIT\n' + ' */'
1314
},
15+
coffee: {
16+
build: {
17+
src: ['common/src/*.coffee', 'modules/**/src/*.coffee'],
18+
extension: ".coffee.js"
19+
}
20+
},
1421
concat: {
1522
basic: {
1623
src: ['<banner:meta.banner>', 'common/*.js', 'modules/*/*/*.js'],
@@ -53,7 +60,7 @@ module.exports = function(grunt) {
5360
watch: {
5461
files: ['modules/**/*.coffee', 'modules/**/*.js', 'common/**/*.js'],
5562
tasks: 'coffee concat:basic test'
56-
},
63+
}
5764
});
5865

5966
// Default task.
@@ -69,7 +76,7 @@ module.exports = function(grunt) {
6976
var done = this.async();
7077
grunt.utils.spawn({
7178
cmd: 'testacular-run',
72-
args: ['test/test-config.js'],
79+
args: ['test/test-config.js']
7380
}, function(error, result, code) {
7481
if (error) {
7582
grunt.warn("Make sure the testacular server is online: run `grunt server`.\n"+
@@ -85,16 +92,4 @@ module.exports = function(grunt) {
8592
}
8693
});
8794
});
88-
89-
grunt.registerTask('coffee', 'compile coffee files', function() {
90-
var done = this.async();
91-
grunt.utils.spawn({
92-
cmd: 'coffee',
93-
args: ['-cb', 'modules']
94-
}, function(error, result, code) {
95-
if (error) grunt.warn(error.stderr);
96-
else grunt.log.write(result.stdout);
97-
done();
98-
});
99-
});
10095
};

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@
1212
"node": ">= 0.6.11"
1313
},
1414
"dependencies": {
15-
"grunt-recess": "~0.1.0",
16-
"testacular": "0.0.14"
1715
},
18-
"devDependencies": {}
16+
"devDependencies": {
17+
"grunt-recess": "~0.1.0",
18+
"grunt-coffee": "~0.0.3",
19+
"async": "0.1.x",
20+
"testacular": "0.0.x"
21+
}
1922
}

0 commit comments

Comments
 (0)