mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-04-05 15:41:03 +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('css'));
|
||||||
writesFuture.push(writer.symlinkTemplate('font'));
|
writesFuture.push(writer.symlinkTemplate('font'));
|
||||||
writesFuture.push(writer.symlinkTemplate('img'));
|
writesFuture.push(writer.symlink('../../docs/img', 'build/docs/img'));
|
||||||
writesFuture.push(writer.symlinkTemplate('js'));
|
writesFuture.push(writer.symlinkTemplate('js'));
|
||||||
|
|
||||||
var manifest = 'manifest="/build/docs/appcache.manifest"';
|
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) {
|
function symlinkTemplate(filename) {
|
||||||
var dest = OUTPUT_DIR + filename,
|
var dest = OUTPUT_DIR + filename,
|
||||||
dirDepth = dest.split('/').length,
|
dirDepth = dest.split('/').length,
|
||||||
src = Array(dirDepth).join('../') + 'docs/src/templates/' + filename;
|
src = Array(dirDepth).join('../') + 'docs/src/templates/' + filename;
|
||||||
|
|
||||||
return qfs.exists(dest).then(function(exists) {
|
return symlink(src, dest);
|
||||||
if (!exists) {
|
|
||||||
qfs.symbolicLink(dest, src);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue