Skip to content

Commit d9e4a51

Browse files
committed
Detect old versions of angular and tns-core-modules and fail the build.
1 parent c1f1446 commit d9e4a51

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: gruntfile.js

+6
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ module.exports = function(grunt) {
140140
},[
141141
'angular2-*.tgz'
142142
]);
143+
if (packageFiles.length > 1) {
144+
throw new Error('Multiple packages found!. Delete all but one: ' + packageFiles);
145+
}
143146
var angularPackagePath = path.join(angularDistPath, packageFiles[0]);
144147
grunt.config('angularPackagePath', angularPackagePath);
145148
});
@@ -158,6 +161,9 @@ module.exports = function(grunt) {
158161
},[
159162
'tns-core-modules*.tgz'
160163
]);
164+
if (packageFiles.length > 1) {
165+
throw new Error('Multiple packages found!. Delete all but one: ' + packageFiles);
166+
}
161167
var nsPackagePath = path.join(nsDistPath, packageFiles[0]);
162168
grunt.config('nsPackagePath', nsPackagePath);
163169
});

0 commit comments

Comments
 (0)