-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add precommit hook to format code snippets (#55)
* add pre-commit hook * format code snippets
- Loading branch information
Showing
13 changed files
with
69 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
|
||
# Run Prettier on all files in snippets/code | ||
echo "Running Prettier on the following files:" | ||
npx prettier --write ".snippets/code/**/*.{js,ts,json,css,html}" | ||
|
||
# Add formatted files back to the commit | ||
echo "Adding formatted files back to the commit..." | ||
git add $(find .snippets/code -name "*.js" -o -name "*.ts" -o -name "*.json" -o -name "*.css" -o -name "*.html") |
8 changes: 4 additions & 4 deletions
8
...utorials/polkadot-sdk/build-a-blockchain/build-a-local-blockchain/compilation-output.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<div id="termynal" data-termynal> | ||
<span data-ty="input"><span class="file-path"></span>cargo build --release</span> | ||
<span data-ty>Compiling solochain-template-node</span> | ||
<span data-ty>Finished `release` profile [optimized] target(s) in 27.12s</span> | ||
</div> | ||
<span data-ty="input"><span class="file-path"></span>cargo build --release</span> | ||
<span data-ty>Compiling solochain-template-node</span> | ||
<span data-ty>Finished `release` profile [optimized] target(s) in 27.12s</span> | ||
</div> |
22 changes: 11 additions & 11 deletions
22
...rials/polkadot-sdk/build-a-blockchain/build-a-local-blockchain/node-block-production.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
<div id='termynal' data-termynal> | ||
<span data-ty>...</span> | ||
<span data-ty>2024-09-09 08:32:47 💤 Idle (0 peers), best: #0 (0x0eef…935d), finalized #0 (0x0eef…935d), ⬇ 0 ⬆ 0</span> | ||
<span data-ty>...</span> | ||
<span data-ty>2024-09-09 08:32:52 💤 Idle (0 peers), best: #1 (0xcb3d…265b), finalized #0 (0x0eef…935d), ⬇ 0 ⬆ 0</span> | ||
<span data-ty>...</span> | ||
<span data-ty>2024-09-09 08:32:57 💤 Idle (0 peers), best: #2 (0x16d7…083f), finalized #0 (0x0eef…935d), ⬇ 0 ⬆ 0</span> | ||
<span data-ty>...</span> | ||
<span data-ty>2024-09-09 08:33:02 💤 Idle (0 peers), best: #3 (0xe6a4…2cc4), finalized #1 (0xcb3d…265b), ⬇ 0 ⬆ 0</span> | ||
<span data-ty>...</span> | ||
</div> | ||
<div id="termynal" data-termynal> | ||
<span data-ty>...</span> | ||
<span data-ty>2024-09-09 08:32:47 💤 Idle (0 peers), best: #0 (0x0eef…935d), finalized #0 (0x0eef…935d), ⬇ 0 ⬆ 0</span> | ||
<span data-ty>...</span> | ||
<span data-ty>2024-09-09 08:32:52 💤 Idle (0 peers), best: #1 (0xcb3d…265b), finalized #0 (0x0eef…935d), ⬇ 0 ⬆ 0</span> | ||
<span data-ty>...</span> | ||
<span data-ty>2024-09-09 08:32:57 💤 Idle (0 peers), best: #2 (0x16d7…083f), finalized #0 (0x0eef…935d), ⬇ 0 ⬆ 0</span> | ||
<span data-ty>...</span> | ||
<span data-ty>2024-09-09 08:33:02 💤 Idle (0 peers), best: #3 (0xe6a4…2cc4), finalized #1 (0xcb3d…265b), ⬇ 0 ⬆ 0</span> | ||
<span data-ty>...</span> | ||
</div> |
8 changes: 4 additions & 4 deletions
8
...pets/code/tutorials/polkadot-sdk/build-a-blockchain/simulate-a-network/node-shutdown.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<div id='termynal' data-termynal> | ||
<span data-ty>2024-09-10 09:10:03 💤 Idle (1 peers), best: #51 (0x0dd6…e763), finalized #49 (0xb70a…1fc0), ⬇ 0.7kiB/s ⬆ 0.6kiB/s</span> | ||
<span data-ty>2024-09-10 09:10:08 💤 Idle (0 peers), best: #52 (0x2c40…a50e), finalized #49 (0xb70a…1fc0), ⬇ 0.3kiB/s ⬆ 0.3kiB/s</span> | ||
</div> | ||
<div id="termynal" data-termynal> | ||
<span data-ty>2024-09-10 09:10:03 💤 Idle (1 peers), best: #51 (0x0dd6…e763), finalized #49 (0xb70a…1fc0), ⬇ 0.7kiB/s ⬆ 0.6kiB/s</span> | ||
<span data-ty>2024-09-10 09:10:08 💤 Idle (0 peers), best: #52 (0x2c40…a50e), finalized #49 (0xb70a…1fc0), ⬇ 0.3kiB/s ⬆ 0.3kiB/s</span> | ||
</div> |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
.snippets/code/tutorials/tooling/chopsticks/overview/terminal/fork-output.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<div id="termynal" data-termynal> | ||
<span data-ty="input"><span class="file-path"></span>npx @acala-network/chopsticks xcm \</span> | ||
<span data-ty>--r polkadot \</span> | ||
<span data-ty>--p moonbeam \</span> | ||
<span data-ty>--p astar</span> | ||
<br /> | ||
<span data-ty>[13:46:07.901] INFO: Loading config file https://raw.githubusercontent.com/AcalaNetwork/chopsticks/master/configs/moonbeam.yml</span> | ||
<span data-ty> app: "chopsticks"</span> | ||
<span data-ty>[13:46:12.631] INFO: Moonbeam RPC listening on port 8000</span> | ||
<span data-ty> app: "chopsticks"</span> | ||
<span data-ty>[13:46:12.632] INFO: Loading config file https://raw.githubusercontent.com/AcalaNetwork/chopsticks/master/configs/astar.yml</span> | ||
<span data-ty> app: "chopsticks"</span> | ||
<span data-ty> chopsticks::executor TRACE: Calling Metadata_metadata</span> | ||
<span data-ty> chopsticks::executor TRACE: Completed Metadata_metadata</span> | ||
<span data-ty>[13:46:23.669] INFO: Astar RPC listening on port 8001</span> | ||
<span data-ty> app: "chopsticks"</span> | ||
<span data-ty>[13:46:25.144] INFO (xcm): Connected parachains [2004,2006]</span> | ||
<span data-ty> app: "chopsticks"</span> | ||
<span data-ty>[13:46:25.144] INFO: Loading config file https://raw.githubusercontent.com/AcalaNetwork/chopsticks/master/configs/polkadot.yml</span> | ||
<span data-ty> app: "chopsticks"</span> | ||
<span data-ty> chopsticks::executor TRACE: Calling Metadata_metadata</span> | ||
<span data-ty> chopsticks::executor TRACE: Completed Metadata_metadata</span> | ||
<span data-ty>[13:46:53.320] INFO: Polkadot RPC listening on port 8002</span> | ||
<span data-ty> app: "chopsticks"</span> | ||
<span data-ty>[13:46:54.038] INFO (xcm): Connected relaychain 'Polkadot' with parachain 'Moonbeam'</span> | ||
<span data-ty> app: "chopsticks"</span> | ||
<span data-ty>[13:46:55.028] INFO (xcm): Connected relaychain 'Polkadot' with parachain 'Astar'</span> | ||
<span data-ty> app: "chopsticks"</span> | ||
</div> |
29 changes: 0 additions & 29 deletions
29
.snippets/code/tutorials/tooling/chopsticks/overview/terminal/fork-output.md
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters