mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-27 23:14:00 +00:00
chore(ngdoc): fix deprecated node api path.existsSync -> fs.existsSync
This commit is contained in:
parent
63c1e5beff
commit
65f5e856a1
1 changed files with 3 additions and 3 deletions
|
|
@ -145,7 +145,7 @@ Doc.prototype = {
|
||||||
example.addSource(name, content);
|
example.addSource(name, content);
|
||||||
});
|
});
|
||||||
content.replace(/<file\s+src="([^"]+)"(?:\s+tag="([^"]+)")?(?:\s+name="([^"]+)")?\s*\/?>/gmi, function(_, file, tag, name) {
|
content.replace(/<file\s+src="([^"]+)"(?:\s+tag="([^"]+)")?(?:\s+name="([^"]+)")?\s*\/?>/gmi, function(_, file, tag, name) {
|
||||||
if(fspath.existsSync(file)) {
|
if(fs.existsSync(file)) {
|
||||||
var content = fs.readFileSync(file, 'utf8');
|
var content = fs.readFileSync(file, 'utf8');
|
||||||
if(content && content.length > 0) {
|
if(content && content.length > 0) {
|
||||||
if(tag && tag.length > 0) {
|
if(tag && tag.length > 0) {
|
||||||
|
|
@ -160,7 +160,7 @@ Doc.prototype = {
|
||||||
return placeholder(example.toHtml());
|
return placeholder(example.toHtml());
|
||||||
}).
|
}).
|
||||||
replace(/(?:\*\s+)?<file.+?src="([^"]+)"(?:\s+tag="([^"]+)")?\s*\/?>/i, function(_, file, tag) {
|
replace(/(?:\*\s+)?<file.+?src="([^"]+)"(?:\s+tag="([^"]+)")?\s*\/?>/i, function(_, file, tag) {
|
||||||
if(fspath.existsSync(file)) {
|
if(fs.existsSync(file)) {
|
||||||
var content = fs.readFileSync(file, 'utf8');
|
var content = fs.readFileSync(file, 'utf8');
|
||||||
if(tag && tag.length > 0) {
|
if(tag && tag.length > 0) {
|
||||||
content = extractInlineDocCode(content, tag);
|
content = extractInlineDocCode(content, tag);
|
||||||
|
|
@ -361,7 +361,7 @@ Doc.prototype = {
|
||||||
|
|
||||||
html_usage_parameters: function(dom) {
|
html_usage_parameters: function(dom) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var params = this.param ? this.param : [];
|
var params = this.param ? this.param : [];
|
||||||
if(params.length > 0) {
|
if(params.length > 0) {
|
||||||
dom.html('<h2 id="parameters">Parameters</h2>');
|
dom.html('<h2 id="parameters">Parameters</h2>');
|
||||||
dom.html('<table class="variables-matrix table table-bordered table-striped">');
|
dom.html('<table class="variables-matrix table table-bordered table-striped">');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue