Skip to content

Commit ecb2bd0

Browse files
committed
chore(windows): fix the build.dart task
1 parent 7e8a2b9 commit ecb2bd0

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

modules/angular2/src/transform/reflection_remover/codegen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Codegen {
1717
{String prefix})
1818
: this.prefix = prefix == null ? _PREFIX_BASE : prefix,
1919
importUris = newEntryPointPaths.map((p) =>
20-
path.relative(p, from: path.dirname(reflectionEntryPointPath))) {
20+
path.relative(p, from: path.dirname(reflectionEntryPointPath)).replaceAll('\\', '/')) {
2121
if (this.prefix.isEmpty) throw new ArgumentError.value('(empty)', 'prefix');
2222
}
2323

tools/build/dartanalyzer.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = function(gulp, plugins, config) {
2424
libFiles.concat(testFiles).concat(webFiles).forEach(function(fileName, index) {
2525
if (fileName !== tempFile && fileName.indexOf("/packages/") === -1) {
2626
if (fileName.indexOf('lib') == 0) {
27-
fileName = 'package:' + packageName + '/' + path.relative('lib', fileName);
27+
fileName = 'package:' + packageName + '/' + path.relative('lib', fileName).replace(/\\/g, '/');
2828
}
2929
analyzeFile.push('import "' + fileName + '" as mod' + index + ';');
3030
}
@@ -54,6 +54,10 @@ module.exports = function(gulp, plugins, config) {
5454
var errorCount = 0;
5555
var warningCount = 0;
5656
rl.on('line', function(line) {
57+
if (line == "find: > bin [: No such file or directory") {
58+
//Skip bad output from Dart SDK .bat files on Windows
59+
return;
60+
}
5761
var parsedLine = _AnalyzerOutputLine.parse(line);
5862
if (!parsedLine) {
5963
errorCount++;

tools/build/pubbuild.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function replaceDartWithJsScripts(gulp, folder) {
4848
function removeWebFolder(gulp, folder) {
4949
var folders = [].slice.call(glob.sync(path.join(folder, 'web', '*')));
5050
folders.forEach(function(subFolder) {
51-
fs.renameSync(subFolder, subFolder.replace(path.sep + 'web' + path.sep, path.sep));
51+
fs.renameSync(subFolder, subFolder.replace('/web/', '/'));
5252
});
5353
fs.rmdirSync(path.join(folder, 'web'));
5454
return Q.resolve();

0 commit comments

Comments
 (0)