fis-command-install
Advanced tools
Comparing version 0.1.24 to 0.1.25
@@ -219,11 +219,20 @@ var request = require('request'); | ||
var target = path.join(factory.settings.componentsDir, self.name); | ||
var mapping = self.config.mapping || [{ | ||
reg: '*', | ||
release: '$&' | ||
}]; | ||
mapping.push({ | ||
reg: '**', | ||
release: false | ||
}); | ||
var mapping = self.config.mapping || []; | ||
if (mapping.length) { | ||
mapping.unshift({ | ||
reg: /^\/component.json$/i, | ||
release: '$1' | ||
}); | ||
mapping.push({ | ||
reg: '**', | ||
release: false | ||
}); | ||
} else { | ||
mapping.push({ | ||
reg: '*', | ||
release: '$&' | ||
}); | ||
} | ||
scaffold.deliver(location, target, mapping); | ||
@@ -230,0 +239,0 @@ resolve(self); |
@@ -171,11 +171,19 @@ var request = require('request'); | ||
var target = path.join(factory.settings.componentsDir, self.name); | ||
var mapping = self.config.mapping || [{ | ||
reg: '*', | ||
release: '$&' | ||
}]; | ||
var mapping = self.config.mapping || []; | ||
mapping.push({ | ||
reg: '**', | ||
release: false | ||
}); | ||
if (mapping.length) { | ||
mapping.unshift({ | ||
reg: /^\/component.json$/i, | ||
release: '$1' | ||
}); | ||
mapping.push({ | ||
reg: '**', | ||
release: false | ||
}); | ||
} else { | ||
mapping.push({ | ||
reg: '*', | ||
release: '$&' | ||
}); | ||
} | ||
scaffold.deliver(location, target, mapping); | ||
@@ -182,0 +190,0 @@ |
@@ -147,11 +147,20 @@ var request = require('request'); | ||
var target = path.join(factory.settings.componentsDir, self.name); | ||
var mapping = self.config.mapping || [{ | ||
reg: '*', | ||
release: '$&' | ||
}]; | ||
mapping.push({ | ||
reg: '**', | ||
release: false | ||
}); | ||
var mapping = self.config.mapping || []; | ||
if (mapping.length) { | ||
mapping.unshift({ | ||
reg: /^\/component.json$/i, | ||
release: '$1' | ||
}); | ||
mapping.push({ | ||
reg: '**', | ||
release: false | ||
}); | ||
} else { | ||
mapping.push({ | ||
reg: '*', | ||
release: '$&' | ||
}); | ||
} | ||
scaffold.deliver(location, target, mapping); | ||
@@ -158,0 +167,0 @@ |
{ | ||
"name": "fis-command-install", | ||
"description": "fis install command.", | ||
"version": "0.1.24", | ||
"version": "0.1.25", | ||
"author": "FIS Team <fis@baidu.com>", | ||
@@ -6,0 +6,0 @@ "homepage": "http://fis.baidu.com/", |
49435
1158