mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
chore(docs): correctly link docs images
This commit is contained in:
parent
ade7127c79
commit
c287c8361d
2 changed files with 13 additions and 7 deletions
|
|
@ -45,7 +45,7 @@ function writeTheRest(writesFuture) {
|
|||
|
||||
writesFuture.push(writer.symlinkTemplate('css'));
|
||||
writesFuture.push(writer.symlinkTemplate('font'));
|
||||
writesFuture.push(writer.symlinkTemplate('img'));
|
||||
writesFuture.push(writer.symlink('../../docs/img', 'build/docs/img'));
|
||||
writesFuture.push(writer.symlinkTemplate('js'));
|
||||
|
||||
var manifest = 'manifest="/build/docs/appcache.manifest"';
|
||||
|
|
|
|||
|
|
@ -60,17 +60,23 @@ exports.copy = function(from, to, transform) {
|
|||
};
|
||||
|
||||
|
||||
exports.symlinkTemplate= symlinkTemplate;
|
||||
exports.symlink = symlink;
|
||||
function symlink(from, to) {
|
||||
return qfs.exists(to).then(function(exists) {
|
||||
if (!exists) {
|
||||
return qfs.symbolicLink(to, from);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
exports.symlinkTemplate = symlinkTemplate;
|
||||
function symlinkTemplate(filename) {
|
||||
var dest = OUTPUT_DIR + filename,
|
||||
dirDepth = dest.split('/').length,
|
||||
src = Array(dirDepth).join('../') + 'docs/src/templates/' + filename;
|
||||
|
||||
return qfs.exists(dest).then(function(exists) {
|
||||
if (!exists) {
|
||||
qfs.symbolicLink(dest, src);
|
||||
}
|
||||
});
|
||||
return symlink(src, dest);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue