Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
75f6dbb8
Unverified
Commit
75f6dbb8
authored
Jun 11, 2021
by
Francisco Giordano
Committed by
GitHub
Jun 11, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add import statements and GitHub link in API docs (#2714)
parent
9d5f77db
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
2 deletions
+20
-2
contract.hbs
docs/contract.hbs
+6
-1
helpers.js
docs/helpers.js
+10
-0
prelude.hbs
docs/prelude.hbs
+2
-0
package.json
package.json
+1
-1
prepare-docs.sh
scripts/prepare-docs.sh
+1
-0
No files found.
docs/contract.hbs
View file @
75f6dbb8
...
...
@@ -8,7 +8,12 @@
[.contract]
[[
{{
anchor
}}
]]
=== `++
{{
name
}}
++`
=== `++
{{
name
}}
++` link:
{{
github-link
file
.
path
}}
[{github-icon},role=heading-link]
[.hljs-theme-light.nopadding]
```solidity
import "@openzeppelin/contracts/
{{
file
.
path
}}
";
```
{{
natspec
.
devdoc
}}
...
...
docs/helpers.js
0 → 100644
View file @
75f6dbb8
const
{
version
}
=
require
(
'../package.json'
);
module
.
exports
=
{
'github-link'
:
(
contractPath
)
=>
{
if
(
typeof
contractPath
!==
'string'
)
{
throw
new
Error
(
'Missing argument'
);
}
return
`https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v
${
version
}
/contracts/
${
contractPath
}
`
;
},
};
docs/prelude.hbs
View file @
75f6dbb8
:github-icon: pass:[
<svg
class=
"icon"
><use
href=
"#github-icon"
/></svg>
]
{{#
links
}}
:
{{
slug
target
.
fullName
}}
: pass:normal[xref:
{{
path
}}
#
{{
target
.
anchor
}}
[`
{{
target
.
fullName
}}
`]]
:xref-
{{
slug
target
.
anchor
}}
: xref:
{{
path
}}
#
{{
target
.
anchor
}}
...
...
package.json
View file @
75f6dbb8
...
...
@@ -14,7 +14,7 @@
"compile"
:
"hardhat compile"
,
"coverage"
:
"hardhat coverage"
,
"docs"
:
"oz-docs"
,
"docs:watch"
:
"npm run docs watch contracts 'docs/*.hbs'"
,
"docs:watch"
:
"npm run docs watch contracts 'docs/*.hbs'
docs/helpers.js
"
,
"prepare-docs"
:
"scripts/prepare-docs.sh"
,
"lint"
:
"npm run lint:js && npm run lint:sol"
,
"lint:fix"
:
"npm run lint:js:fix && npm run lint:sol:fix"
,
...
...
scripts/prepare-docs.sh
View file @
75f6dbb8
...
...
@@ -15,6 +15,7 @@ solidity-docgen \
-o
"
$OUTDIR
"
\
-e
contracts/mocks,contracts/examples
\
--output-structure
readmes
\
--helpers
./docs/helpers.js
\
--solc-module
./scripts/prepare-docs-solc.js
node scripts/gen-nav.js
"
$OUTDIR
"
>
"
$OUTDIR
/../nav.adoc"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment