This repository has been archived by the owner on Sep 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #229 from getwax/wax-215-add-compression
Add compression to bundler
- Loading branch information
Showing
14 changed files
with
293 additions
and
115 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
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 |
---|---|---|
@@ -1,12 +1,34 @@ | ||
#!/usr/bin/env tsx | ||
|
||
/* eslint-disable no-console */ | ||
|
||
import concurrently from 'concurrently'; | ||
import config from '../demo/config/config.ts'; | ||
|
||
const tasks = ['vite']; | ||
|
||
let externalNode: boolean; | ||
|
||
if (config.rpcUrl === 'http://127.0.0.1:8545') { | ||
tasks.push('yarn --cwd hardhat hardhat node'); | ||
try { | ||
await fetch(config.rpcUrl); | ||
externalNode = true; | ||
} catch (e) { | ||
if ((e as { code: string }).code !== 'ECONNREFUSED') { | ||
throw e; | ||
} | ||
|
||
externalNode = false; | ||
tasks.push('yarn --cwd hardhat hardhat node'); | ||
} | ||
} else { | ||
externalNode = true; | ||
} | ||
|
||
if (externalNode) { | ||
console.log(`Relying on external node: ${config.rpcUrl}`); | ||
} else { | ||
console.log('Starting dev node'); | ||
} | ||
|
||
await concurrently(tasks, { killOthers: 'failure' }).result; |
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
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
Oops, something went wrong.