Skip to content

Commit

Permalink
Change doc command and filename
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejearley committed Aug 14, 2023
1 parent 82f76b2 commit fba1848
Show file tree
Hide file tree
Showing 4 changed files with 313 additions and 333 deletions.
2 changes: 1 addition & 1 deletion contracts/ethereum/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ Users can deposit any amount of ETH to the manager contract. Their deposits are

Sure! Here's the User Fees section structured similarly to the blame amount and user stake calculations:

### User Fees Calculation:
### User Fees

The contract charges a user fee on deposits and rewards to cover operational expenses.

Expand Down
14 changes: 7 additions & 7 deletions contracts/ethereum/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@casimir/ethereum",
"scripts": {
"node": "npx hardhat node",
"dev": "npx hardhat run scripts/dev.ts",
"dev:docs": "SERVE=true npx esno scripts/docs.ts",
"deploy": "npx hardhat run scripts/deploy.ts",
"test": "npx esno scripts/test.ts",
"build": "npx hardhat compile",
"clean": "npx rimraf ./build",
"deploy": "npx hardhat run scripts/deploy.ts",
"dev": "npx hardhat run scripts/dev.ts",
"doc": "npx esno scripts/doc.ts",
"doc:serve": "SERVE=true npx esno scripts/doc.ts",
"node": "npx hardhat node",
"postinstall": "npx esno scripts/foundryup.ts",
"build": "npx hardhat compile",
"build:docs": "npx esno scripts/docs.ts"
"test": "npx esno scripts/test.ts"
},
"dependencies": {
"@chainlink/contracts": "^0.6.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import { run } from '@casimir/helpers'

void async function () {
const config = await run('forge config') as string
const out = config.match(/\[doc\]\nout = "(.*)"/)?.[1] as string
if (!fs.existsSync(out)) {
fs.mkdirSync(out, { recursive: true })
const outDir = config.match(/\[doc\]\nout = "(.*)"/)?.[1] as string
if (!fs.existsSync(outDir)) {
fs.mkdirSync(outDir, { recursive: true })
}
const publicDir = fs.readdirSync('public')
for (const file of publicDir) {
fs.copyFileSync(`public/${file}`, `${out}/${file}`)
fs.copyFileSync(`public/${file}`, `${outDir}/${file}`)
}
let command = 'forge doc'
if (process.env.SERVE === 'true') {
command += ' --serve --port=5458'
}
run(command)
await run(command)
}()
Loading

0 comments on commit fba1848

Please sign in to comment.