npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hardhat-nodemon

v1.1.0

Published

A Nodemon kind of experience for hardhat

Downloads

59

Readme


Demo

demo


Installation

  1. To install via npm, use --

    npm i --save-dev hardhat-nodemon

    (or)

    yarn add -D hardhat-nodemon

  2. To run locally,

    • Clone repo
    • Run yarn
    • Run npm link
    • Run npm link hardhat-nodemon wherever you wish to use

NOTE: This requires at least Node Version >= 14.17.0

Usage

After installation, add the following line to your hardhat.config.ts --

import "hardhat-nodemon";

in order to extend hardhat with this plugin.

Features

  1. Compile:

    • A flag --watch is provided to compile to watch for contract changes to re-compile.

    • 2 additional helper options are also provided --

      only:

      • This accepts a string of contract names, separated by comma (,)

      • Only these contracts are watched for compilation

      • eg: npx hardhat compile watch --only "Sample.sol, Sample2.sol"

      except:

      • This accepts a string of contract names, separated by comma (,)

      • Only these contracts are not watched for compilation

      • eg: npx hardhat compile watch --except "Sample.sol, Sample2.sol"

    • Run npx hardhat compile --help for more details.

    npx hardhat compile --help
     Hardhat version 2.9.1
    
     Usage: hardhat [GLOBAL OPTIONS] compile [--except <STRING>] [--force] [--no-size-contracts] [--no-typechain] [--only <STRING>] [--quiet] [--watch]
    
     OPTIONS:
    
     --except           	A list of contracts to ignore while watching for compilation, separated by commas (.sol files) (default: "")
     --force            	Force compilation ignoring cache
     --no-typechain     	Skip Typechain compilation
     --only             	A list of contracts to watch for compilation, separated by commas (.sol files) (default: "")
     --quiet            	Makes the compilation process less verbose
     --watch            	Watch changes in contract files
    
     compile: Compiles the entire project, building all artifacts
    
     For global options help run: hardhat help
  2. Test:

    • A flag --watch is provided to test to watch for tests / contracts changes to re-compile.

    • It inherits all features of the base test but extends it with watching capabilities for both test files and solidity contracts.

    • Run npx hardhat test --help for more details.

    npx hardhat test --help
     Hardhat version 2.9.1
    
     Usage: hardhat [GLOBAL OPTIONS] test [--bail] --grep <STRING> [--no-compile] [--parallel] [--watch] [...testFiles]
    
     OPTIONS:
    
     --bail      	Stop running tests after the first test failure
     --grep      	Only run tests matching the given string or regexp
     --no-compile	Don't compile before running this task
     --parallel  	Run tests in parallel
     --watch     	Watch changes in files used in test (from testDir of config)
    
     POSITIONAL ARGUMENTS:
    
     testFiles	An optional list of files to test (default: [])
    
     test: Runs mocha tests
    
     For global options help run: hardhat help
  3. Extended Config:

    • hardhat.config.ts accepts a config of compilerWatcher which takes --
    {
      noCompile?: boolean;
      compileDir?: string;
      testDir?: string;
    }
    • By default the values are --
    {
      noCompile: false;
      compileDir: "contracts";
      testDir: "test";
    }
    • This can mainly be used to define compilation flow at start, directory where contracts are stored and directory where tests are stored.

License

MIT